[6.3.0][V2N] 修正新链路乘客屏道路事件触发时不绘制
This commit is contained in:
@@ -76,6 +76,24 @@ class TeleMsgHandler : IMsgHandler {
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
if (it.protocolType == TelematicConstant.V2N_NEW_LINK_SWITCH) {
|
||||
try {
|
||||
Log.d(TAG, "乘客屏收到司机屏转发的新链路开关 --- 1 ---")
|
||||
val content = String(it.body, Charset.defaultCharset())
|
||||
Log.d(TAG, "乘客屏收到司机屏转发的新链路开关 --- 2 ---:$content")
|
||||
val data = GsonUtils.fromJson(content, Map::class.java)
|
||||
val f1 = data["f1"] as Boolean
|
||||
val f2 = data["f2"] as Boolean
|
||||
Log.d(TAG, "乘客屏收到司机屏转发的新链路开关 --- 3 ---:$data, f1: $f1, f2:$f2")
|
||||
FunctionBuildConfig.v2nMainSwitch = f1
|
||||
FunctionBuildConfig.isNewV2NData = f2
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
Log.e(TAG, "乘客屏收到司机屏转发的新链路开关异常", t)
|
||||
}
|
||||
return
|
||||
}
|
||||
when (it.protocolType) {
|
||||
MogoProtocolMsg.NORMAL_DATA -> {
|
||||
try {
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.mogo.eagle.core.function.call.unmanned.CallerUnmannedListenerManager
|
||||
import com.mogo.eagle.core.function.hmi.ui.utils.HmiActionLog.Companion.hmiAction
|
||||
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
|
||||
import com.mogo.eagle.core.utilcode.mogo.vehicle.SweeperVehicleConfigUtils
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ThreadUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ToastUtils
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
@@ -224,6 +225,11 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
return@setOnCheckedChangeListener
|
||||
}
|
||||
FunctionBuildConfig.v2nMainSwitch = isChecked
|
||||
val map = HashMap<String, Boolean>().also {
|
||||
it["f1"] = isChecked
|
||||
it["f2"] = FunctionBuildConfig.isNewV2NData
|
||||
}
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
|
||||
}
|
||||
|
||||
//V2I总开关
|
||||
@@ -281,6 +287,12 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
hmiAction("SOP 是否是V2N新链路(云->工控机->App)", isChecked)
|
||||
FunctionBuildConfig.isNewV2NData = isChecked
|
||||
|
||||
val map = HashMap<String, Boolean>().also {
|
||||
it["f1"] = FunctionBuildConfig.v2nMainSwitch
|
||||
it["f2"] = isChecked
|
||||
}
|
||||
CallerTelematicManager.sendMsgToAllClients(TelematicConstant.V2N_NEW_LINK_SWITCH, GsonUtils.toJson(map).toByteArray())
|
||||
}
|
||||
|
||||
//V2N场景进PNC
|
||||
|
||||
@@ -16,5 +16,8 @@ class TelematicConstant {
|
||||
const val OBU_RUNREDLIGHT_WARNING = 200 //闯红灯预警开关
|
||||
const val OBU_GREENWAVE_WARNING = 201 //绿波通行开关
|
||||
|
||||
|
||||
const val V2N_NEW_LINK_SWITCH = 202 // FunctionBuildConfig#v2nMainSwitch & FunctionBuildConfig#isNewV2NData
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user