[dev_robobus-d_230322_3.0.0]云调度增加重启自驾功能
This commit is contained in:
@@ -74,6 +74,10 @@ class FuncBizProvider : IMoGoFuncBizProvider {
|
||||
dispatchAutoPilotManager.stopCancel(manualTrigger)
|
||||
}
|
||||
|
||||
override fun restartDispatchAffirm() {
|
||||
dispatchAutoPilotManager.restartDispatch()
|
||||
}
|
||||
|
||||
override fun testDispatch(sceneType: Int) {
|
||||
dispatchAutoPilotManager.testDispatch(sceneType)
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Compani
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_MANUAL_CANCEL
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_TIMER_CANCEL
|
||||
import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.dispatchServiceModel
|
||||
import com.zhjt.mogo.adas.data.bean.MogoReport
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
|
||||
@@ -251,6 +252,15 @@ class DispatchAutoPilotManager private constructor() :
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重启自驾
|
||||
*/
|
||||
fun restartDispatch(){
|
||||
CallerHmiManager.dismissDispatchDialog()
|
||||
//启动自动驾驶
|
||||
startAutoPilot()
|
||||
}
|
||||
|
||||
override fun onCheck(isChecked: Boolean) {
|
||||
if (isChecked) {
|
||||
// 确保到达终点后,再次点击,不会有回馈,并且在下次调开始时,才会重置
|
||||
@@ -329,18 +339,40 @@ class DispatchAutoPilotManager private constructor() :
|
||||
*/
|
||||
override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) {
|
||||
if (guardianInfo == null || !guardianInfo.hasCode()) return
|
||||
if ("ISYS_INIT_TRAJECTORY_START".equals(guardianInfo.getCode())){
|
||||
Log.i(TAG,"onAutopilotGuardian "+guardianInfo.code)
|
||||
//掉自驾
|
||||
when(guardianInfo.code){
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_PLANNING,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_LOCATION,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_DISTANCE,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_BRAKE,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_ACCEL,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_STEER,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_GEAR_SWITCH,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS_NO_RESPONSE,
|
||||
MogoReport.Code.Error.EMAP.EXIT_AUTOPILOT_FOR_CHASSIS_UNKNOWN->{
|
||||
//如果到达终点,则不处理
|
||||
if(isArriveEnd){
|
||||
return
|
||||
}
|
||||
//处于云调度任务中且调度实体类不为空,弹出重启自驾弹窗
|
||||
if(isDispatch){
|
||||
receiverBean?.let { CallerHmiManager.showDispatchRestartDialog(it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
if ("ISYS_INIT_TRAJECTORY_START".equals(guardianInfo.code)){
|
||||
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_START 轨迹管理_轨迹开始下载(本地已有对应轨迹也触发)")
|
||||
}else if ("ISYS_INIT_TRAJECTORY_SUCCESS".equals(guardianInfo.getCode())){
|
||||
}else if ("ISYS_INIT_TRAJECTORY_SUCCESS".equals(guardianInfo.code)){
|
||||
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_SUCCESS 轨迹管理_轨迹下载成功(本地已有对应轨迹也触发)")
|
||||
}else if ("ISYS_INIT_TRAJECTORY_FAILURE".equals(guardianInfo.getCode())){
|
||||
}else if ("ISYS_INIT_TRAJECTORY_FAILURE".equals(guardianInfo.code)){
|
||||
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_FAILURE 轨迹管理_轨迹下载失败,本地无对应轨迹")
|
||||
}else if ("ISYS_INIT_TRAJECTORY_WARNING".equals(guardianInfo.getCode())){
|
||||
}else if ("ISYS_INIT_TRAJECTORY_WARNING".equals(guardianInfo.code)){
|
||||
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_WARNING 轨迹管理_轨迹下载失败,本地有对应轨迹,认为成功")
|
||||
}else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.getCode())){
|
||||
}else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.code)){
|
||||
Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_TIMEOUT 轨迹管理_轨迹下载超时")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fun testDispatch(sceneType: Int) {
|
||||
|
||||
Reference in New Issue
Block a user