From e27b271e603052a815492e0e41b67a28076b309d Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Wed, 27 Mar 2024 16:39:38 +0800 Subject: [PATCH] =?UTF-8?q?[6.3.0][Feat]=E5=8F=B8=E6=9C=BA=E5=B1=8F?= =?UTF-8?q?=E5=A4=A9=E6=B0=94=E6=95=88=E6=9E=9C=E5=BC=80=E5=85=B3=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E5=90=8C=E6=AD=A5=E7=BB=99=E4=B9=98=E5=AE=A2=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../datacenter/autopilot/telematic/TeleMsgHandler.kt | 7 +++++++ .../eagle/core/function/hmi/ui/setting/SOPSettingView.kt | 2 ++ .../mogo/eagle/core/data/multidisplay/TelematicConstant.kt | 1 + 3 files changed, 10 insertions(+) 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 //绿波通行开关