|
|
|
|
@@ -28,6 +28,7 @@ import com.mogo.eagle.core.data.multidisplay.TelematicConstant
|
|
|
|
|
import com.mogo.eagle.core.data.obu.MogoObuConst
|
|
|
|
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.autopilot.IMoGoGetParamResponseListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.devatools.IImgUploadCloudListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.devatools.mofang.IMoGoMoFangProvider
|
|
|
|
|
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
|
|
|
|
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener.Companion.FUNC_MODE_DEMO
|
|
|
|
|
@@ -39,6 +40,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListener
|
|
|
|
|
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotCarConfigListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.autopilot.CallerAutopilotGetParamResponseDispatcher
|
|
|
|
|
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.devatools.CallerImgUploadCloudManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
|
|
|
|
import com.mogo.eagle.core.function.call.map.CallerMapUIServiceManager
|
|
|
|
|
@@ -66,6 +68,7 @@ import com.mogo.eagle.core.utilcode.util.AppStateManager
|
|
|
|
|
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.mogo.eagle.core.utilcode.util.UiThreadHandler
|
|
|
|
|
import com.mogo.support.device.led.ILedForeverChangeWelcomeContentListener
|
|
|
|
|
import com.mogo.support.device.led.LedSourceManager
|
|
|
|
|
import com.zhjt.mogo.adas.data.AdasConstants
|
|
|
|
|
@@ -1058,7 +1061,8 @@ class OperatePanelLayout : LinearLayout {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class VehiclesPreferenceFragmentCompat : OperatePanelDetailBase(), IMoGoAutopilotCarConfigListener, ISopSettingListener, IViewControlListener, IMoGoGetParamResponseListener {
|
|
|
|
|
class VehiclesPreferenceFragmentCompat : OperatePanelDetailBase(), IMoGoAutopilotCarConfigListener, ISopSettingListener, IViewControlListener, IMoGoGetParamResponseListener,
|
|
|
|
|
IImgUploadCloudListener {
|
|
|
|
|
companion object {
|
|
|
|
|
private const val TAG = "VehiclesPreferenceFragmentCompat"
|
|
|
|
|
private const val KEY_PNC_PARK_INTERSECTION_CAR = "pnc_park_intersection_car"
|
|
|
|
|
@@ -1068,6 +1072,7 @@ class OperatePanelLayout : LinearLayout {
|
|
|
|
|
private const val KEY_FAULT_DECELERATION_PARK = "fault_deceleration_park"
|
|
|
|
|
private const val KEY_WEAK_NET_DECELERATION_PARK = "weak_net_deceleration_park"
|
|
|
|
|
private const val KEY_EXAM_FUNCTION_PANEL = "exam_function_panel"
|
|
|
|
|
private const val KEY_IMAGE_UPLOAD = "image_upload"
|
|
|
|
|
private const val KEY_ALL_MERGE_MODE = "all_merge_mode"
|
|
|
|
|
private const val KEY_BLIND_AREA_MODE = "blind_area_mode"
|
|
|
|
|
private const val KEY_BEYOND_VISUAL_RANGE_MODE = "beyond_visual_range_mode"
|
|
|
|
|
@@ -1082,16 +1087,18 @@ class OperatePanelLayout : LinearLayout {
|
|
|
|
|
|
|
|
|
|
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View {
|
|
|
|
|
Logger.d(TAG, "--- onCreateView --- 1 ---")
|
|
|
|
|
CallerAutopilotGetParamResponseDispatcher.addListener(TAG, this)
|
|
|
|
|
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
|
|
|
|
|
CallerSopSettingManager.addListener(TAG, this)
|
|
|
|
|
CallerHmiViewControlListenerManager.addListener(TAG, this)
|
|
|
|
|
CallerImgUploadCloudManager.addListener(TAG, this)
|
|
|
|
|
if (AppConfigInfo.isConnectAutopilot) {
|
|
|
|
|
Logger.d(TAG, "--- onCreateView --- 2 ---") //获取车辆配置
|
|
|
|
|
CallerAutoPilotControlManager.getCarConfig() //查询融合模式
|
|
|
|
|
CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.FUSION_MODE)
|
|
|
|
|
CallerAutoPilotControlManager.sendGetParamReq(AdasConstants.MapSystemParamType.OVERTAKE_MAX_SPEED)
|
|
|
|
|
CallerAutoPilotControlManager.sendImgUploadCloudStatusQuery()
|
|
|
|
|
}
|
|
|
|
|
CallerAutopilotGetParamResponseDispatcher.addListener(TAG, this)
|
|
|
|
|
CallerAutopilotCarConfigListenerManager.addListener(TAG, this)
|
|
|
|
|
CallerSopSettingManager.addListener(TAG, this)
|
|
|
|
|
CallerHmiViewControlListenerManager.addListener(TAG, this)
|
|
|
|
|
return super.onCreateView(inflater, container, savedInstanceState)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1100,6 +1107,7 @@ class OperatePanelLayout : LinearLayout {
|
|
|
|
|
CallerAutopilotCarConfigListenerManager.removeListener(TAG)
|
|
|
|
|
CallerSopSettingManager.removeListener(TAG)
|
|
|
|
|
CallerHmiViewControlListenerManager.removeListener(TAG)
|
|
|
|
|
CallerImgUploadCloudManager.removeListener(TAG)
|
|
|
|
|
super.onDestroyView()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1237,6 +1245,9 @@ class OperatePanelLayout : LinearLayout {
|
|
|
|
|
KEY_RAIN_DAY -> {
|
|
|
|
|
return FunctionBuildConfig.isRainMode
|
|
|
|
|
}
|
|
|
|
|
KEY_IMAGE_UPLOAD -> {
|
|
|
|
|
return FunctionBuildConfig.isImageUpload
|
|
|
|
|
}
|
|
|
|
|
KEY_WEAK_NET_DECELERATION_PARK -> {
|
|
|
|
|
return FunctionBuildConfig.isWeakNetSlowDown
|
|
|
|
|
}
|
|
|
|
|
@@ -1386,6 +1397,19 @@ class OperatePanelLayout : LinearLayout {
|
|
|
|
|
clickEventAnalytics("考试功能面板", isChecked)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
KEY_IMAGE_UPLOAD -> {
|
|
|
|
|
val isChecked = newValue as? Boolean ?: false
|
|
|
|
|
FunctionBuildConfig.isImageUpload = isChecked
|
|
|
|
|
//域控摄像头上传NDE云开关命令
|
|
|
|
|
CallerAutoPilotControlManager.sendImgUploadCloudEnable(isChecked)
|
|
|
|
|
//查询域控摄像头上传NDE云开关状态查询,设置完成后延迟500毫秒进行查询
|
|
|
|
|
UiThreadHandler.postDelayed({
|
|
|
|
|
CallerAutoPilotControlManager.sendImgUploadCloudStatusQuery()
|
|
|
|
|
}, 500)
|
|
|
|
|
hmiAction("SOP 车辆图像上传行云大模型, ", isChecked)
|
|
|
|
|
clickEventAnalytics("车辆图像上传行云大模型", isChecked)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
KEY_ALL_MERGE_MODE -> {
|
|
|
|
|
if (preference.extras.containsKey("is_checked")) {
|
|
|
|
|
preference.extras.remove("is_checked")
|
|
|
|
|
@@ -1489,6 +1513,13 @@ class OperatePanelLayout : LinearLayout {
|
|
|
|
|
}
|
|
|
|
|
return super.onPreferenceChange(preference, newValue)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 查询摄像头上传NDE云状态返回
|
|
|
|
|
*/
|
|
|
|
|
override fun onImgUploadCloudStatusResp(resp: MessagePad.ImgUploadCloudStatusResp) {
|
|
|
|
|
preferenceScreen.findPreferenceReal<SwitchPreferenceCompat>(KEY_IMAGE_UPLOAD)?.also { changeValue(it, resp.enable) }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class WelcomeWordsPreferenceCompat : OperatePanelDetailBase() {
|
|
|
|
|
|