diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/telematic/TeleMsgHandler.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/telematic/TeleMsgHandler.kt index 2952f4196f..fd230403ea 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/telematic/TeleMsgHandler.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/telematic/TeleMsgHandler.kt @@ -18,6 +18,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager.setIgnoreConditionDraw import com.mogo.eagle.core.function.call.cloud.CallerCloudListenerManager import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager +import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager import com.mogo.eagle.core.function.call.telematic.CallerTelematicListenerManager import com.mogo.eagle.core.function.call.v2x.CallerTrafficLightListenerManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger @@ -216,6 +217,12 @@ class TeleMsgHandler : IMsgHandler { } } + TelematicConstant.WEATHER_SWITCH_STATUS -> { + ThreadUtils.runOnUiThread { + CallerMapUIServiceManager.getMapUIController()?.setWeatherEnable(String(it.body) == "1") + } + } + TelematicConstant.OBU_GREENWAVE_WARNING -> { when (String(it.body)) { "0" -> { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt index a08998065c..c817038e46 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt @@ -764,7 +764,9 @@ internal class SOPSettingView @JvmOverloads constructor( it.layoutParams = params it.setOnCheckedChangeListener { _, isChecked -> CallerMapUIServiceManager.getMapUIController()?.setWeatherEnable(isChecked) + CallerTelematicManager.sendMsgToAllClients(TelematicConstant.WEATHER_SWITCH_STATUS, (if (isChecked) "1" else "0").toByteArray()) } + CallerMapUIServiceManager.getMapUIController()?.setWeatherEnable(true) } } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/multidisplay/TelematicConstant.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/multidisplay/TelematicConstant.kt index f618f60157..8204e91eab 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/multidisplay/TelematicConstant.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/multidisplay/TelematicConstant.kt @@ -12,6 +12,7 @@ class TelematicConstant { const val HIDE_TRAFFIC_LIGHT = 102 const val CONTROL_PASSENGER_DRIVER_MONITOR = 105 const val V2N_AI_ROAD_DATA_TO_PASSENGER = 106 // V2N老链路云端下发给司机屏的数据,转发给乘客端 + const val WEATHER_SWITCH_STATUS = 107 // 司机屏的天气效果开关发给乘客端 const val OBU_RUNREDLIGHT_WARNING = 200 //闯红灯预警开关 const val OBU_GREENWAVE_WARNING = 201 //绿波通行开关