diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt index aa51d5e2ed..befe4cd071 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/operate/OperatePanelLayout.kt @@ -571,8 +571,6 @@ class OperatePanelLayout : LinearLayout { }else{ CallerAutoPilotControlManager.sendV2iDownPerceptionToPnc(0) } - //TODO 查询 - hmiAction("V2I下行, ", isChecked) clickEventAnalytics("V2I下行", isChecked) return true @@ -589,8 +587,16 @@ class OperatePanelLayout : LinearLayout { V2I_PERCEPTION_DATA_TO_PNC->{ val isChecked = newValue as? Boolean ?: false FunctionBuildConfig.v2iPerceptionDataToPnc = isChecked - //TODO - + //V2I下行感知进PNC开关 + if(isChecked){ + CallerAutoPilotControlManager.sendV2iDownPerceptionToPnc(1) + }else{ + CallerAutoPilotControlManager.sendV2iDownPerceptionToPnc(0) + } + //查询V2I下行感知进PNC开关状态 + UiThreadHandler.postDelayed({ + CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.V2I_TO_PNC) + }, 500) hmiAction("感知数据进PNC应用, ", isChecked) clickEventAnalytics("感知数据进PNC应用", isChecked) return true @@ -612,23 +618,51 @@ class OperatePanelLayout : LinearLayout { * @param config 数据 */ override fun onCloudConfig(config: MessagePad.CloudConfig) { - //TODO -// //云连接地址 -// message CloudLinkAddr -// { -// uint32 type = 1;//0:蘑菇云 1:NDE云 2:基础平台云 -// uint32 direction = 2;//0:上行和下行 1:上行 2:下行 -// string domain = 3;//域名 -// uint32 port = 4;//端口 0xFFFFFFFF 无效值 -// bool enable = 5;//连接使能开关, true:开 false:关闭 -// string ip = 6;//ip -// } -// -////域控连接的云端配置 -// message CloudConfig -// { -// repeated CloudLinkAddr addrs = 1; -// } + //云连接地址 + config.addrsList.forEach { + when(it.type){ + //蘑菇云,暂时用不到 + 0->{ + + } + //NDE云 + 1->{ + when(it.direction){ + //上行和下行 + 0->{ + FunctionBuildConfig.ndeUpwardSwitch = it.enable + FunctionBuildConfig.ndeDownwardSwitch = it.enable + } + //上行 + 1->{ + FunctionBuildConfig.ndeUpwardSwitch = it.enable + } + //下行 + 2->{ + FunctionBuildConfig.ndeDownwardSwitch = it.enable + } + } + } + //基础平台云 + 2->{ + when(it.direction){ + //上行和下行 + 0->{ + FunctionBuildConfig.cloudControlUpward = it.enable + FunctionBuildConfig.cloudControlDownward = it.enable + } + //上行 + 1->{ + FunctionBuildConfig.cloudControlUpward = it.enable + } + //下行 + 2->{ + FunctionBuildConfig.cloudControlDownward = it.enable + } + } + } + } + } } /**