[8.1.4]
[fea] [tts 司机屏乘客屏车外]
This commit is contained in:
@@ -10,6 +10,8 @@ import com.mogo.eagle.core.utilcode.util.CoordinateUtils
|
||||
import com.mogo.och.bridge.autopilot.location.OchLocationManager
|
||||
import com.mogo.och.bridge.distance.TrajectoryAndDistanceManager
|
||||
import com.mogo.och.bridge.bridge.OchBridgeManager
|
||||
import com.mogo.och.bridge.bridge.OchCollisionRiskManager
|
||||
import com.mogo.och.bridge.bridge.OchPncManager
|
||||
import com.mogo.och.bridge.bridge.OchVlmManager
|
||||
import com.mogo.och.bridge.trajectory.TrajectoryManager
|
||||
import com.mogo.och.common.module.biz.birdge.BridgeService
|
||||
@@ -35,10 +37,9 @@ class BridgeProvider : BridgeService, CallerBase<BridgeListener>() {
|
||||
|
||||
// 车前引导线+预测数据
|
||||
OchBridgeManager.load()
|
||||
|
||||
// if(EnvManager.isT1T2Passenger()){
|
||||
OchVlmManager.load()
|
||||
// }
|
||||
OchVlmManager.load()
|
||||
OchPncManager.load()
|
||||
OchCollisionRiskManager.load()
|
||||
|
||||
TrajectoryManager.load()
|
||||
}
|
||||
@@ -114,5 +115,17 @@ class BridgeProvider : BridgeService, CallerBase<BridgeListener>() {
|
||||
}
|
||||
}
|
||||
|
||||
fun invokePncData(pncAction:String){
|
||||
M_LISTENERS.forEach {
|
||||
it.value.onPncInfoListener(pncAction)
|
||||
}
|
||||
}
|
||||
|
||||
fun invokeCollisionRisk(){
|
||||
M_LISTENERS.forEach {
|
||||
it.value.onCollisionRisk()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -46,4 +46,12 @@ object BridgeServiceManager {
|
||||
this.bridgeService?.inVokeNdeData(title,desc,sortedList)
|
||||
}
|
||||
|
||||
fun invokePncData(pncAction:String){
|
||||
this.bridgeService?.invokePncData(pncAction)
|
||||
}
|
||||
|
||||
fun collisionRisk() {
|
||||
this.bridgeService?.invokeCollisionRisk()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.mogo.och.bridge.bridge
|
||||
|
||||
import com.mogo.eagle.core.function.api.devatools.ICollisionRiskListener
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerCollisionRiskManager
|
||||
import com.mogo.och.bridge.BridgeServiceManager
|
||||
|
||||
object OchCollisionRiskManager : ICollisionRiskListener {
|
||||
|
||||
private const val TAG = "OchCollisionRiskManager"
|
||||
fun load() {
|
||||
CallerCollisionRiskManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
fun release() {
|
||||
CallerCollisionRiskManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun onCollisionRisk() {
|
||||
BridgeServiceManager.collisionRisk()
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.mogo.och.bridge.bridge
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.pnc.PncActionsHelper
|
||||
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotPlanningActionsListener
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_OCHCOMMON
|
||||
import com.mogo.och.bridge.BridgeServiceManager
|
||||
import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager
|
||||
import kotlin.properties.Delegates
|
||||
import mogo.telematics.pad.MessagePad
|
||||
|
||||
object OchPncManager : IMoGoAutopilotPlanningActionsListener {
|
||||
|
||||
private val TAG = "${M_OCHCOMMON}OchPncManager"
|
||||
|
||||
private var pncAction: String by Delegates.observable("") { _, oldValue, newValue ->
|
||||
if (oldValue != newValue) {
|
||||
OchChainLogManager.writeCHainLogBridge("pnc消息","oldPnc:$oldValue newPnc:$newValue")
|
||||
BridgeServiceManager.invokePncData(newValue)
|
||||
}
|
||||
}
|
||||
|
||||
fun load(){
|
||||
CallerPlanningActionsListenerManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
fun release(){
|
||||
CallerPlanningActionsListenerManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
override fun pncActions(planningActionMsg: MessagePad.PlanningActionMsg) {
|
||||
planningActionMsg.actionMsg?.let {
|
||||
try {
|
||||
pncAction = PncActionsHelper.getAction(
|
||||
it.drivingState.number,
|
||||
it.drivingAction.number
|
||||
)
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
}
|
||||
planningActionMsg.v2NActionMsgList?.forEach { v2nAction ->
|
||||
pncAction = PncActionsHelper.getAction(
|
||||
v2nAction.drivingState.number,
|
||||
v2nAction.drivingAction.number
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,6 +28,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerChassisStatesListenerMa
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerVlmManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerCollisionRiskManager
|
||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
import com.mogo.eagle.core.function.call.map.CallerMapRomaListener
|
||||
@@ -80,8 +81,12 @@ object DebugDataDispatch {
|
||||
const val mediaMusic = "mediaAndMusic"
|
||||
const val vlmMessage = "vlmMessage"
|
||||
const val vlmImage = "vlmImage"
|
||||
const val pncAction = "pncAction"
|
||||
const val collisionRisk = "CollisionRisk"
|
||||
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "location" --es path "1111/11111"
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "pncAction"
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "CollisionRisk"
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "globalPath" --es path "sy73.json"
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "carDoor" --ei doorPostion 1 --ei doorStatus 1
|
||||
// adb shell am broadcast -a com.mogo.launcher.debug -f 0x011000000 --es type "trunAroud" --es code "IMAP_TRA_LOADED"
|
||||
@@ -112,6 +117,18 @@ object DebugDataDispatch {
|
||||
|
||||
}
|
||||
when (type) {
|
||||
collisionRisk -> {
|
||||
CallerCollisionRiskManager.invokeCollisionRisk()
|
||||
}
|
||||
pncAction -> {
|
||||
val time = intent.getFloatExtra("action",0f)
|
||||
val newBuilder = MessagePad.PlanningActionMsg.newBuilder()
|
||||
val actionMsg = MessagePad.DrivingActionMsg.newBuilder()
|
||||
actionMsg.drivingAction = MessagePad.DrivingAction.DRIVING_ACTION_STATE_ONE
|
||||
actionMsg.drivingState = MessagePad.DrivingState.PULL_OVER
|
||||
newBuilder.actionMsg = actionMsg.build()
|
||||
CallerPlanningActionsListenerManager.invokePNCActions(newBuilder.build())
|
||||
}
|
||||
vlmMessage -> {
|
||||
val time = intent.getFloatExtra("time",0f)
|
||||
val id = intent.getIntExtra("id",0)
|
||||
|
||||
@@ -22,4 +22,8 @@ interface BridgeListener {
|
||||
fun onVlmDataListener(vlmData: VlmData){}
|
||||
|
||||
fun onNdeDataListener(title: String, desc: String, sortedList: List<RoadMsg>) {}
|
||||
|
||||
fun onPncInfoListener(pncAction: String) {}
|
||||
|
||||
fun onCollisionRisk() {}
|
||||
}
|
||||
@@ -80,5 +80,7 @@ class OchCommonConst {
|
||||
const val Charter_AVERAGE_SPEED = 15
|
||||
//T1T2的平均里程:38km/h
|
||||
const val TAXI_AVERAGE_SPEED = 38
|
||||
|
||||
const val PNC_ACTION_ENTERSTATION = "正在进站"
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,13 @@ object OchChainLogManager {
|
||||
|
||||
const val EVENT_KEY_INFO_VLM = "analytics_event_och_vlm"
|
||||
|
||||
const val EVENT_KEY_INFO_BRIDGE = "analytics_event_och_bridge"
|
||||
|
||||
|
||||
fun writeCHainLogBridge(title: String,info: String) {
|
||||
writeChainLog(title, info, false, EVENT_KEY_INFO_BRIDGE)
|
||||
}
|
||||
|
||||
fun writeChainLogEye(title: String, info: String) {
|
||||
writeChainLog(title, info, true, EVENT_KEY_INFO_CALL_EYE)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user