[6.10.2]配合自动驾驶车视频接入行云大模型

This commit is contained in:
xuxinchao
2025-04-17 19:15:04 +08:00
parent 7529d51e5b
commit f87f4607f9
9 changed files with 130 additions and 5 deletions

View File

@@ -1594,6 +1594,21 @@ class MoGoAutopilotControlProvider :
return AdasManager.getInstance().sendCopyBagAbortCopy() > -1
}
/**
* 域控摄像头上传NDE云开关命令
* @param enable false: 关闭, true: 打开
*/
override fun sendImgUploadCloudEnable(enable: Boolean): Boolean {
return AdasManager.getInstance().sendImgUploadCloudEnable(enable) > -1
}
/**
* 查询域控摄像头上传NDE云开关状态查询
*/
override fun sendImgUploadCloudStatusQuery(): Boolean {
return AdasManager.getInstance().sendImgUploadCloudStatusQuery() > -1
}
/**
* 云端配置查询
*/

View File

@@ -88,6 +88,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerV2XListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerV2nNioEventListenerManager
import com.mogo.eagle.core.function.call.devatools.CallerCaptureImgManager
import com.mogo.eagle.core.function.call.devatools.CallerDiskCopyManager
import com.mogo.eagle.core.function.call.devatools.CallerImgUploadCloudManager
import com.mogo.eagle.core.function.call.devatools.CallerOTAManager
import com.mogo.eagle.core.function.call.msgbox.CallerMsgBoxManager
import com.mogo.eagle.core.function.call.obu.CallerObuMapMathListenerManager
@@ -1482,6 +1483,7 @@ class MoGoAdasListenerImpl : OnAdasListener {
header: MessagePad.Header,
resp: MessagePad.ImgUploadCloudStatusResp
) {
CallerImgUploadCloudManager.invokeImgUploadCloudStatusResp(resp)
}
/**

View File

@@ -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() {

View File

@@ -45,6 +45,13 @@
android:title="考试功能面板"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat" />
<SwitchPreferenceCompat
android:key="image_upload"
android:layout="@layout/layout_operate_panel_preference_switch_compat"
android:title="车辆图像上传行云大模型"
android:persistent="false"
android:widgetLayout="@layout/layout_operate_panel_preference_widget_switch_compat"
/>
<CheckBoxPreference
android:key="all_merge_mode"
android:layout="@layout/layout_operate_panel_preference_checkbox_compat"

View File

@@ -367,6 +367,13 @@ object FunctionBuildConfig {
@JvmField
var isShowExamWindow = false
/**
* 车辆图像上传行云大模型
*/
@Volatile
@JvmField
var isImageUpload = false
/**
* 清扫车 默认业务模式(打包时默认的模式)
*/

View File

@@ -758,6 +758,17 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
*/
fun sendCopyBagAbortCopy(): Boolean
/**
* 域控摄像头上传NDE云开关命令
* @param enable false: 关闭, true: 打开
*/
fun sendImgUploadCloudEnable(enable: Boolean): Boolean
/**
* 查询域控摄像头上传NDE云开关状态查询
*/
fun sendImgUploadCloudStatusQuery(): Boolean
/**
* 云端配置查询
*/

View File

@@ -0,0 +1,15 @@
package com.mogo.eagle.core.function.api.devatools
import mogo.telematics.pad.MessagePad
/**
* 域控摄像头上传NDE云开关状态回调
*/
interface IImgUploadCloudListener {
/**
* 查询状态回调
*/
fun onImgUploadCloudStatusResp(resp: MessagePad.ImgUploadCloudStatusResp)
}

View File

@@ -1132,6 +1132,22 @@ object CallerAutoPilotControlManager {
fun sendCopyBagAbortCopy(): Boolean{
return providerApi?.sendCopyBagAbortCopy()?:false
}
/**
* 域控摄像头上传NDE云开关命令
* @param enable false: 关闭, true: 打开
*/
fun sendImgUploadCloudEnable(enable: Boolean): Boolean{
return providerApi?.sendImgUploadCloudEnable(enable)?:false
}
/**
* 查询域控摄像头上传NDE云开关状态查询
*/
fun sendImgUploadCloudStatusQuery(): Boolean{
return providerApi?.sendImgUploadCloudStatusQuery()?:false
}
/**
* 云端配置查询
*/

View File

@@ -0,0 +1,21 @@
package com.mogo.eagle.core.function.call.devatools
import com.mogo.eagle.core.function.api.devatools.IImgUploadCloudListener
import com.mogo.eagle.core.function.call.base.CallerBase
import mogo.telematics.pad.MessagePad
/**
* 域控摄像头上传NDE云开关状态回调管理
*/
object CallerImgUploadCloudManager: CallerBase<IImgUploadCloudListener>() {
/**
* 查询摄像头上传NDE云状态返回
*/
fun invokeImgUploadCloudStatusResp(resp: MessagePad.ImgUploadCloudStatusResp){
M_LISTENERS.forEach{
val listener = it.value
listener.onImgUploadCloudStatusResp(resp)
}
}
}