diff --git a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt index 2318c66d8d..caec9aab44 100644 --- a/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt +++ b/core/function-impl/mogo-core-function-autopilot/src/main/java/com/mogo/eagle/core/function/autopilot/MoGoAutopilotProvider.kt @@ -379,6 +379,16 @@ class MoGoAutopilotProvider : return AdasManager.getInstance().startRecordPackage(id, duration, type, bduration) } + override fun recordPackage( + type: Int, + id: Int, + duration: Int, + bduration: Int, + topics: List + ): Boolean { + return AdasManager.getInstance().startRecordPackage(id, duration, type, bduration, topics) + } + override fun stopRecord(type: Int, id: Int): Boolean { return AdasManager.getInstance().stopRecordPackage(id, type) } @@ -521,9 +531,13 @@ class MoGoAutopilotProvider : /** * 获取数据采集录制模式配置列表 + * @param reqType 0: all, 1:获取当前所有topic列表, 2:配置需要预加载的topic组合 + * @param recordType 0:不需要修改内置类型的topic组合, 1:需要修改内置类型的topic组合 + * @param topicsNeedToCache + * @return boolean */ - override fun getBadCaseConfig() { -// AdasManager.getInstance().sendRecordDataConfigReq() TODO 需要传参 + override fun getBadCaseConfig(reqType: Int,recordType: Int,topicsNeedToCache: List): Boolean{ + return AdasManager.getInstance().sendRecordDataConfigReq(reqType, recordType, topicsNeedToCache) } /** diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseConfigView.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseConfigView.kt index f7d92b33d0..23af1a9edf 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseConfigView.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/badcase/biz/BadCaseConfigView.kt @@ -252,8 +252,8 @@ defStyleAttr: Int = 0 override fun onAttachedToWindow() { super.onAttachedToWindow() CallerAutopilotRecordListenerManager.addListener(TAG, this) - //获取数据采集录制模式配置列表 - CallerAutoPilotManager.getBadCaseConfig() + //获取数据采集录制模式配置列表 TODO +// CallerAutoPilotManager.getBadCaseConfig() } override fun onDetachedFromWindow() { 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 a9cb80c07c..ae03721b01 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 @@ -130,8 +130,8 @@ class SOPSettingView @JvmOverloads constructor( //变道绕障的目标障碍物速度阈值 tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s" ivSpeedReduce.setOnClickListener { - if(FunctionBuildConfig.detouringSpeed<=0){ - ToastUtils.showShort("阈值小可为0 m/s") + if(FunctionBuildConfig.detouringSpeed<=3){ + ToastUtils.showShort("阈值小可为3 m/s") }else{ FunctionBuildConfig.detouringSpeed-- tvSpeed.text = "${FunctionBuildConfig.detouringSpeed} m/s" diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt index 17c2717bce..947362f230 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotProvider.kt @@ -88,6 +88,17 @@ interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider { */ fun recordPackage(type: Int,id: Int,duration: Int,bduration: Int): Boolean + /** + * 开启域控制器录制bag包 + * @param type 录制类型 1: badcase 2:map 3:rests + * @param id 指令/任务 ID + * @param duration 录制时长 + * @param bduration 录制前溯时长 + * @param topics 录制Topic集合 + * @return true-成功,false-失败 + */ + fun recordPackage(type: Int,id: Int,duration: Int,bduration: Int,topics: List): Boolean + /** * Log 是否显示 * @@ -168,8 +179,12 @@ interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider { /** * 获取数据采集录制模式配置列表 + * @param reqType 0: all, 1:获取当前所有topic列表, 2:配置需要预加载的topic组合 + * @param recordType 0:不需要修改内置类型的topic组合, 1:需要修改内置类型的topic组合 + * @param topicsNeedToCache + * @return boolean */ - fun getBadCaseConfig() + fun getBadCaseConfig(reqType: Int,recordType: Int,topicsNeedToCache: List): Boolean /** * 发送工控机所有节点重启命令 diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt index 2a2d6de7d5..044b4931c1 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotManager.kt @@ -136,6 +136,12 @@ object CallerAutoPilotManager { } } + fun recordPackage(type: Int,id: Int,duration: Int,bduration: Int,topics: List){ + if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)){ + providerApi?.recordPackage(type, id, duration, bduration, topics) + } + } + /** * 停止录制bag包 */ @@ -249,11 +255,14 @@ object CallerAutoPilotManager { /** * 获取数据采集录制模式配置列表 + * @param reqType 0: all, 1:获取当前所有topic列表, 2:配置需要预加载的topic组合 + * @param recordType 0:不需要修改内置类型的topic组合, 1:需要修改内置类型的topic组合 + * @param topicsNeedToCache */ - fun getBadCaseConfig() { + fun getBadCaseConfig(reqType: Int,recordType: Int,topicsNeedToCache: List){ // 司机屏才能查询数据采集的配置 if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { - providerApi?.getBadCaseConfig() + providerApi?.getBadCaseConfig(reqType, recordType, topicsNeedToCache) } }