[2.13.0] fix bug of traffic type enmu and update func of vip

This commit is contained in:
zhongchao
2022-11-29 20:02:39 +08:00
parent 96585e089e
commit d1e7a80119
5 changed files with 33 additions and 15 deletions

View File

@@ -318,7 +318,8 @@ class MoGoAdasListenerImpl : OnAdasListener {
header: MessagePad.Header,
carConfigResp: MessagePad.CarConfigResp?
) {
if (/*HdMapBuildConfig.isMapLoaded &&*/ carConfigResp != null) {
if (carConfigResp != null) {
//todo emArrow startUp时确认数据完整性
AppConfigInfo.plateNumber = carConfigResp.plateNumber//车牌号
AppConfigInfo.iPCMacAddress = carConfigResp.macAddress//工控机MAC地址
AppConfigInfo.protocolVersionNumber = carConfigResp.protocolVersionValue//工控机协议版本

View File

@@ -34,7 +34,6 @@ class FuncConfigNetWorkModel {
if (error == null) {
error = onError
}
//todo test
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
map["mac"] = DeviceUtils.getMacAddress()
map["channelVersion"] = FuncConfigConst.getChannelCode()

View File

@@ -83,6 +83,7 @@ class V2XWarningBroadcastReceiver : BroadcastReceiver() {
V2XMsg(v2xType.toString(), alertContent, ttsContent)
)
)
//预留调试入口
CallerHmiManager.warningV2X(v2xType.toString(), alertContent, ttsContent,
tag, null, true, 5000L)
}

View File

@@ -9,14 +9,20 @@ import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.BIZ_VIP
import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig.Companion.V2N
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.data.trafficlight.TrafficLightResult
import com.mogo.eagle.core.data.trafficlight.currentRoadTrafficLight
import com.mogo.eagle.core.data.trafficlight.isGreen
import com.mogo.eagle.core.data.trafficlight.isRed
import com.mogo.eagle.core.data.v2x.VipMessage
import com.mogo.eagle.core.function.api.hmi.warning.IMoGoWarningStatusListener
import com.mogo.eagle.core.function.api.trafficlight.IMoGoTrafficLightListener
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.trafficlight.CallerTrafficLightListenerManager
import com.mogo.eagle.core.function.call.vip.CallVipSetListenerManager
import com.mogo.eagle.core.function.v2x.trafficlight.core.MogoTrafficLightManager
@@ -25,11 +31,6 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_V2X
import com.mogo.eagle.core.utilcode.util.ToastUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.mogo.eagle.core.data.enums.EventTypeEnum
import com.mogo.eagle.core.data.msgbox.MsgBoxBean
import com.mogo.eagle.core.data.msgbox.MsgBoxType
import com.mogo.eagle.core.data.msgbox.V2XMsg
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.zhjt.service_biz.BizConfig
class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListener,
@@ -205,6 +206,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
MogoTrafficLightManager.INSTANCE.turnLightToGreen(
result!!.lightId, result!!.crossId, bearing, controlTime,
{
// 请求变灯成功,直接提示
if (it.sn == MoGoAiCloudClientConfig.getInstance().sn && it.code == 0) {
CallerLogger.d("$M_V2X$TAG", "变灯请求成功")
showWarning(
@@ -213,7 +215,22 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
EventTypeEnum.TYPE_VIP_IDENTIFICATION.tts,
EventTypeEnum.TYPE_VIP_IDENTIFICATION.poiType
)
} else {
return@turnLightToGreen
}
// 请求变灯失败,根据灯态来提示。 此处灯态未获取到
if (this.result == null || this.result?.currentRoadTrafficLight() == null) {
showWarning(
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.poiType,
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.content + "稍后重试",
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.tts,
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.poiType
)
return@turnLightToGreen
}
// 如果当前为红灯,则提示
if (this.result!!.currentRoadTrafficLight()!!.isRed()) {
val time = if (it.countDown / 60 >= 1) {
"${it.countDown / 60}${it.countDown % 60}秒后重试"
} else {
@@ -230,6 +247,11 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.tts,
EventTypeEnum.TYPE_VIP_ERROR_IDENTIFICATION.poiType
)
} else {
CallerLogger.d(
"$M_V2X$TAG",
"变灯请求失败,当前为非红灯不做展示 , light : ${result.toString()} , trafficLightControl : $it"
)
}
},
{ errorMsg ->
@@ -246,12 +268,7 @@ class VipCarManager : IMogoOnMessageListener<VipMessage>, IMoGoTrafficLightListe
tag: String
) {
CallerMsgBoxManager.saveMsgBox(
MsgBoxBean(
MsgBoxType.V2X,
V2XMsg(v2xType,
alertContent.toString(),
ttsContent)
)
MsgBoxBean(MsgBoxType.V2X, V2XMsg(v2xType, alertContent.toString(), ttsContent))
)
CallerHmiManager.warningV2X(
v2xType, alertContent, ttsContent, tag,