[6.6.0] find bug of pb to json

This commit is contained in:
EmArrow
2024-08-09 16:54:34 +08:00
parent 41f762cbdd
commit e5b5f3194a
6 changed files with 124 additions and 108 deletions

View File

@@ -8,29 +8,28 @@ import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.data.config.HdMapBuildConfig
import com.mogo.eagle.core.data.deva.chain.ChainConstant
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_ABILITY
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_ARRIVE
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_GUARDIAN
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_RECORD
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_ROUTE
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_STATUS
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_TRAJECTORY
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_VEHICLE
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_CAR_CONFIG
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_CAR_LOC
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_FM_MSG
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_GUARDIAN
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_MAP_PARAM
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_PARALLEL
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_P_ACTIONS
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_P_OBJECTS
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_RECORD
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_ROUTE
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_STATUS
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_STATUS_QUERY_RESP
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_TRAJECTORY
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_CODE_ADAS_VEHICLE
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_SOURCE_ADAS
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_GNSS
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_STATUS
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_AUTOPILOT
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_TRAJECTORY
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_VEHICLE
import com.mogo.eagle.core.function.call.autopilot.*
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_STATUS
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeArriveAtStation
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotGuardian
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutopilotSNRequest
@@ -38,38 +37,67 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeSystemStatus
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.updateAutoPilotDockerInfo
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.updateAutoPilotStatus
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotActionsListenerManager.invokeAutopilotAbility
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager.invokeAutopilotCarConfigData
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotGetParamResponseDispatcher
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyDataUpdate
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotIdentifyListenerManager.invokeAutopilotIdentifyPlanningObj
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotPointCloudListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordConfig
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotRecordListenerManager.invokeAutopilotRecordResult
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotStatisticsListenerManager.invokeAutopilotStatistics
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotVehicleStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerBackCameraVideoListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerBatteryManagementSystemListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisAccStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisBrakeStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisDoorStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGearStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisGnssListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisLamplightListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisSteeringStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerChassisThrottleStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerFaultManagementStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerFsm2024ListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerLocalizationStateListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingActionsListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerParallelDrivingListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningActionsListenerManager.invokePNCActions
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningRottingListenerManager.invokeAutopilotRotting
import com.mogo.eagle.core.function.call.autopilot.CallerPlanningTrajectoryListenerManager.invokeAutopilotTrajectory
import com.mogo.eagle.core.function.call.autopilot.CallerReceiveReceivedAckListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerRoboBusJinlvM1StatesListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerRoboBusJinlvM1StitchedVideoListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerStartAutopilotFailedListenerManager.invokeStartAutopilotFailed
import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianCleanSystemListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianCloudTaskListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerV2XListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerV2nNioEventListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuMapMathListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsiListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuWarningRsmListenerManager
import com.mogo.eagle.core.function.call.obu.CallerObuWarningSpatListenerManager
import com.mogo.eagle.core.utilcode.mogo.logger.Logger
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_D_C
import com.mogo.eagle.core.utilcode.util.DeviceUtils
import com.mogo.support.obu.ObuScene
import com.zhidao.support.adas.high.OnAdasListener
import com.zhjt.mogo.adas.data.bean.AdasParam
import com.zhidao.support.adas.high.common.ProtocolStatus
import com.zhjt.mogo.adas.data.AiCloudTask
import com.zhjt.mogo.adas.data.bean.AdasParam
import com.zhjt.mogo.adas.data.bean.AutopilotStatistics
import com.zhjt.mogo.adas.data.bean.ReceivedAck
import com.zhjt.mogo.adas.data.bean.LaunchConditionData
import com.zhjt.mogo.adas.data.bean.ReceivedAck
import com.zhjt.mogo.adas.data.bean.UnableLaunchReason
import com.zhjt.mogo.adas.data.sweeper.bootable.SweeperBootable
import com.zhjt.mogo.adas.data.sweeper.task.SweeperTask
import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume
import com.zhjt.mogo.adas.data.sweeper.task.big.SweeperBigTaskStatus
import com.zhjt.mogo.adas.data.sweeper.task.cloud.s_r.SweeperTaskCloudSuspendResume
import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm
import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume
import com.zhjt.mogo.adas.data.sweeper.task.status.SweeperTaskStatus
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop
import com.zhjt.service.chain.ChainLog
@@ -140,10 +168,13 @@ class MoGoAdasListenerImpl : OnAdasListener {
override fun onGnssInfo(header: MessagePad.Header, gnssInfo: MessagePad.GnssInfo) {
CallerChassisGnssListenerManager.invokeChassisGnssListener(gnssInfo)
if (gnssInfo != null) {
if (1 == FunctionBuildConfig.gpsProvider) {
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
CallerAutoPilotStatusListenerManager.updateAutoPilotLocAndTime(gnssInfo.satelliteTime, gnssInfo.longitude, gnssInfo.latitude, gnssInfo.heading)
}
// 同步更新经纬度和系统时间至 AutoPilotStatusListener
CallerAutoPilotStatusListenerManager.updateAutoPilotLocAndTime(
gnssInfo.satelliteTime,
gnssInfo.longitude,
gnssInfo.latitude,
gnssInfo.heading
)
}
}
@@ -167,8 +198,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
) {
CallerAutopilotActionsListenerManager.setVehicleState(vehicleState)
if (vehicleState != null) {
//转向灯数据
// CallerChassisLamplightListenerManager.invokeAutopilotLightSwitchData(vehicleState.light)
//刹车灯数据
CallerChassisLamplightListenerManager.invokeAutopilotBrakeLightData(vehicleState.brakeLightStatus)
//方向盘转向角数据
@@ -231,10 +260,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
CallerAutopilotActionsListenerManager.setChassisStates(chassisStates)
if (chassisStates != null) {
chassisStates.bcmSystemStates?.let { bcmSystemStates ->
// bcmSystemStates.turnLightState?.let {
// //转向灯数据
// CallerChassisLamplightListenerManager.invokeAutopilotLightSwitchData(it)
// }
//刹车灯数据
CallerChassisLamplightListenerManager.invokeAutopilotBrakeLightData(bcmSystemStates.brakeLightState != 0)
}
@@ -461,18 +486,20 @@ class MoGoAdasListenerImpl : OnAdasListener {
header: MessagePad.Header?,
statusInfo: SystemStatusInfo.StatusInfo?
) {
if(statusInfo!=null && statusInfo.hasAutoPilotReady()){
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().ssmAutoPilotReady = statusInfo.autoPilotReady
}else{
if (statusInfo != null && statusInfo.hasAutoPilotReady()) {
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().ssmAutoPilotReady =
statusInfo.autoPilotReady
} else {
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().ssmAutoPilotReady = false
}
invokeAutopilotStatusRespByQuery(statusInfo)
}
override fun onSystemStatus(header: MessagePad.Header?, statusInf: SsmInfo.SsmStatusInf?) {
if(statusInf!=null && statusInf.hasAutoPilotReady()){
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().ssmAutoPilotReady = statusInf.autoPilotReady
}else{
if (statusInf != null && statusInf.hasAutoPilotReady()) {
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().ssmAutoPilotReady =
statusInf.autoPilotReady
} else {
CallerAutoPilotStatusListenerManager.getAutoPilotStatusInfo().ssmAutoPilotReady = false
}
invokeSystemStatus(statusInf)
@@ -817,8 +844,19 @@ class MoGoAdasListenerImpl : OnAdasListener {
* @param sysTime 当前时间戳
* @param bigTaskActionPush 数据
*/
override fun onSweeperFutianCloudTaskCloudSuspendResume(header: MessagePad.Header, messageType: AiCloudTask.MessageType, reqNo: String?, sysTime: Long, bigTaskActionPush: SweeperTaskCloudSuspendResume.BigTaskActionPush?) {
CallerSweeperFutianCloudTaskListenerManager.invokeSweeperFutianCloudTaskCloudSuspendResume(messageType, reqNo, sysTime, bigTaskActionPush)
override fun onSweeperFutianCloudTaskCloudSuspendResume(
header: MessagePad.Header,
messageType: AiCloudTask.MessageType,
reqNo: String?,
sysTime: Long,
bigTaskActionPush: SweeperTaskCloudSuspendResume.BigTaskActionPush?
) {
CallerSweeperFutianCloudTaskListenerManager.invokeSweeperFutianCloudTaskCloudSuspendResume(
messageType,
reqNo,
sysTime,
bigTaskActionPush
)
}
/**
@@ -1034,18 +1072,15 @@ class MoGoAdasListenerImpl : OnAdasListener {
launchConditionData: LaunchConditionData,
unableAutopilotReasons: ArrayList<UnableLaunchReason>?
) {
var reason = ""
if (unableAutopilotReasons != null) {
reason = unableAutopilotReasons.toString()
}
autopilotAbilityCheck(isAutopilotAbility, reason, launchConditionData.json)
invokeAutopilotAbility(isAutopilotAbility, launchConditionData, unableAutopilotReasons)
}
override fun onParallelDrivingAbility(
isParallelDrivingAbility: Boolean
) {
CallerParallelDrivingActionsListenerManager.invokeParallelDrivingAbility(isParallelDrivingAbility)
CallerParallelDrivingActionsListenerManager.invokeParallelDrivingAbility(
isParallelDrivingAbility
)
}
/**
@@ -1058,16 +1093,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
CallerReceiveReceivedAckListenerManager.invokeReceiveReceivedAck(receivedAck)
}
@ChainLog(
linkChainLog = CHAIN_TYPE_SOCKET_AUTOPILOT,
linkCode = CHAIN_SOURCE_ADAS,
nodeAliasCode = CHAIN_CODE_ADAS_ABILITY,
paramIndexes = [0, 1, 2]
)
private fun autopilotAbilityCheck(isAutopilotAbility: Boolean, reason: String, launchConditionDataJson: String) {
}
/**
* 启动自动驾驶失败回调
* 根据MAP 系统监控状态返回过滤
@@ -1097,6 +1122,6 @@ class MoGoAdasListenerImpl : OnAdasListener {
* @param bytes 原始数据
*/
override fun onError(status: ProtocolStatus, bytes: ByteArray) {
Logger.e(TAG, "status===$status")
CallerLogger.e("$M_D_C$TAG", "status===$status")
}
}