From ea4f43002b335c57f992e215da0842170b164ba5 Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 13 Apr 2023 16:34:41 +0800 Subject: [PATCH 1/4] =?UTF-8?q?[2.15.0][ByteX]=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E5=81=B6=E7=8E=B0=E6=89=93=E5=8C=85=E5=A4=B1=E8=B4=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- gradle/ext.gradle | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index a9ad1ca75f..6a1ebf8bf9 100644 --- a/build.gradle +++ b/build.gradle @@ -34,7 +34,7 @@ buildscript { classpath "com.mogo.cloud:systrace:${plugin_version}" classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18' classpath "com.mogo.sticky:service:${plugin_version}" - classpath "io.github.knight-zxw:lancet-plugin:${plugin_version}" + classpath "io.github.knight-zxw:lancet-plugin:${lancetx_plugin_version}" // classpath ("com.tencent.matrix:matrix-gradle-plugin:0.6.6") { changing = true } } diff --git a/gradle/ext.gradle b/gradle/ext.gradle index 022a85f90e..5be873b721 100644 --- a/gradle/ext.gradle +++ b/gradle/ext.gradle @@ -1,6 +1,7 @@ ext { gradle_version = '3.5.3' kotlin_version = '1.5.30' - plugin_version = '10.0.1_mogo' + plugin_version = '10.0.0_mogo' hook_log_plugin_version = '1.7.2' + lancetx_plugin_version = '10.0.3_mogo' } \ No newline at end of file From cd8bbc7ba00ae1465dae1d3fbccee09198d138d8 Mon Sep 17 00:00:00 2001 From: wangmingjun Date: Thu, 13 Apr 2023 17:26:12 +0800 Subject: [PATCH 2/4] =?UTF-8?q?[2.15.0]=20try-catch=20=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=95=B0=E7=BB=84=E8=B6=8A=E7=95=8C=E6=83=85?= =?UTF-8?q?=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/bus/ui/adapter/SwitchLineAdapter.kt | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt index 741fd6480e..c559ed0665 100644 --- a/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt +++ b/OCH/mogo-och-bus/src/main/java/com/mogo/och/bus/ui/adapter/SwitchLineAdapter.kt @@ -12,6 +12,7 @@ import androidx.recyclerview.widget.RecyclerView import com.mogo.och.bus.R import com.mogo.och.bus.bean.BusQueryLinesResponse import com.mogo.och.bus.ui.adapter.SwitchLineAdapter.SwitchLineViewHolder +import java.lang.Exception import kotlin.text.StringBuilder /** @@ -62,10 +63,15 @@ class SwitchLineAdapter( line.taskList, object : SwitchLineTaskAdapter.TaskItemClickListener { override fun onItemClick(position: Int,isCheck:Boolean) { - if(isCheck) { - checkLineId = line.lineId - checkTaskId = line.taskList[position].id - }else{ + try { + if(isCheck) { + checkLineId = line.lineId + checkTaskId = line.taskList[position].id + }else{ + checkLineId=-1 + checkTaskId=-1 + } + }catch (e: Exception){ checkLineId=-1 checkTaskId=-1 } From f7316c13cd0a9c208c553c78b3ca6bd0f169a882 Mon Sep 17 00:00:00 2001 From: xuxinchao Date: Thu, 13 Apr 2023 17:53:50 +0800 Subject: [PATCH 3/4] =?UTF-8?q?[dev=5Frobotaxi-d=5F230412=5F2.15.0]?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BA=91=E8=B0=83=E5=BA=A6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/function/biz/FuncBizProvider.kt | 12 ++ .../biz/dispatch/DispatchAutoPilotManager.kt | 198 ++++++++++++++++-- .../dispatch/network/DispatchServiceModel.kt | 8 +- .../core/function/hmi/ui/MoGoHmiProvider.kt | 8 + .../hmi/ui/notice/DispatchBaseDialog.java | 24 ++- .../hmi/ui/notice/DispatchCarsDialog.java | 39 +++- .../hmi/ui/notice/DispatchDialogManager.java | 40 +++- .../hmi/ui/notice/DispatchRestartDialog.java | 29 +++ .../res/layout/dialog_adas_dispatch_cars.xml | 2 + .../layout/dialog_adas_dispatch_restart.xml | 55 +++++ .../src/main/res/values/strings.xml | 3 + .../DispatchAdasAutoPilotLocReceiverBean.java | 193 ++++++++++++++++- .../biz/dispatch/ReportDispatchResult.java | 15 +- .../function/api/biz/IMoGoFuncBizProvider.kt | 16 ++ .../api/hmi/warning/IMoGoHmiProvider.kt | 5 + .../function/call/hmi/CallerHmiManager.kt | 6 + 16 files changed, 618 insertions(+), 35 deletions(-) create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchRestartDialog.java create mode 100644 core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_adas_dispatch_restart.xml diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt index f1c6dfd74e..30e29c0fbb 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/FuncBizProvider.kt @@ -64,10 +64,22 @@ class FuncBizProvider : IMoGoFuncBizProvider { dispatchAutoPilotManager.affirm() } + override fun stopDispatchAffirm() { + dispatchAutoPilotManager.stopAffirm() + } + override fun dispatchCancel(manualTrigger: Boolean) { dispatchAutoPilotManager.cancel(manualTrigger) } + override fun stopDispatchCancel(manualTrigger: Boolean) { + dispatchAutoPilotManager.stopCancel(manualTrigger) + } + + override fun restartDispatchAffirm() { + dispatchAutoPilotManager.restartDispatch() + } + override fun testDispatch(sceneType: Int) { dispatchAutoPilotManager.testDispatch(sceneType) } diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt index 59468e898a..2a8ff7b932 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/DispatchAutoPilotManager.kt @@ -3,8 +3,10 @@ package com.mogo.eagle.function.biz.dispatch import android.content.Context import android.os.Handler import android.os.Message +import android.util.Log import com.mogo.aicloud.services.socket.IMogoOnMessageListener import com.mogo.aicloud.services.socket.MogoAiCloudSocketManager +import com.mogo.commons.voice.AIAssist import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo import com.mogo.eagle.core.data.biz.dispatch.DispatchAdasAutoPilotLocReceiverBean @@ -21,19 +23,26 @@ import com.mogo.eagle.core.function.call.hmi.CallerHmiManager import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant import com.mogo.eagle.core.utilcode.util.CoordinateUtils +import com.mogo.eagle.core.utilcode.util.ToastUtils +import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_COMPLETED import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_AFFIRM import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_MANUAL_CANCEL import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_RESULT_TIMER_CANCEL +import com.mogo.eagle.function.biz.dispatch.network.DispatchServiceModel.Companion.DISPATCH_STOP_AFFIRM +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 //负责监听自动驾驶状态并进行状态上报,自动驾驶路线上报,接收调度指令展示指令弹窗 class DispatchAutoPilotManager private constructor() : - IMogoOnMessageListener, - IMoGoCheckAutoPilotBtnListener, - IMoGoPlanningRottingListener, - IMoGoAutopilotStatusListener { + IMogoOnMessageListener, + IMoGoCheckAutoPilotBtnListener, + IMoGoPlanningRottingListener, + IMoGoAutopilotStatusListener { companion object { private const val TAG = "DispatchAutoPilotManager" @@ -110,6 +119,7 @@ class DispatchAutoPilotManager private constructor() : } override fun onMsgReceived(adasAutoPilotLocReceiverBean: DispatchAdasAutoPilotLocReceiverBean?) { + Log.i(TAG,"onMsgReceived 收到云调度长链接") if (adasAutoPilotLocReceiverBean != null && adasAutoPilotLocReceiverBean.startLat != 0.0 && adasAutoPilotLocReceiverBean.startLon != 0.0) { receiverBean = adasAutoPilotLocReceiverBean val message = Message() @@ -117,11 +127,52 @@ class DispatchAutoPilotManager private constructor() : message.obj = adasAutoPilotLocReceiverBean handler.sendMessage(message) } + //同步调用路线下载逻辑 + adasAutoPilotLocReceiverBean?.let { + if(it.type == 1){ + val mAutoPilotLine = AutopilotControlParameters.AutoPilotLine(it.lineId.toLong(),it.trajUrl,it.trajMd5,it.stopUrl,it.stopMd5,it.timestamp, + it.vehicleModel,it.trajUrl_dpqp,it.trajMd5_dpqp,it.stopUrl_dpqp,it.stopMd5_dpqp,it.timestamp_dpqp) + CallerAutoPilotControlManager.sendTrajectoryDownloadReq(mAutoPilotLine) + Log.i(TAG,"调用路线下载逻辑") + } + } + + adasAutoPilotLocReceiverBean?.let { + Log.i(TAG,"taskId="+it.taskId) + Log.i(TAG,"type="+it.type) + Log.i(TAG,"source="+it.source) + Log.i(TAG,"lineName="+it.lineName) + Log.i(TAG,"stopMd5_dpqp="+it.stopMd5_dpqp) + Log.i(TAG,"stopUrl_dpqp="+it.stopUrl_dpqp) + Log.i(TAG,"trajMd5_dpqp="+it.trajMd5_dpqp) + Log.i(TAG,"trajUrl_dpqp="+it.trajUrl_dpqp) + Log.i(TAG,"stopMd5_dpqp="+it.stopMd5_dpqp) + Log.i(TAG,"stopMd5="+it.stopMd5) + Log.i(TAG,"stopUrl="+it.stopUrl) + Log.i(TAG,"trajUrl="+it.trajUrl) + Log.i(TAG,"trajMd5="+it.trajMd5) + Log.i(TAG,"endLocAddress="+it.endLocAddress) + Log.i(TAG,"flightInfo="+it.flightInfo) + Log.i(TAG,"poiId="+it.poiId) + Log.i(TAG,"startLocAddress="+it.startLocAddress) + Log.i(TAG,"taskInfo="+it.taskInfo) + Log.i(TAG,"taskTime="+it.taskTime) + Log.i(TAG,"vehicleModel="+it.vehicleModel) + Log.i(TAG,"endLat="+it.endLat) + Log.i(TAG,"endLon="+it.endLon) + Log.i(TAG,"lineId="+it.lineId) + Log.i(TAG,"startLat="+it.startLat) + Log.i(TAG,"startLon="+it.startLon) + Log.i(TAG,"stopsList="+it.stopsList) + Log.i(TAG,"timestamp="+it.timestamp) + Log.i(TAG,"systemTime="+it.systemTime) + Log.i(TAG,"timestamp_dpqp="+it.timestamp_dpqp) + } } private fun startAutoPilot() { val currentAutopilot = AutopilotControlParameters() - currentAutopilot.isSpeakVoice = false +// currentAutopilot.isSpeakVoice = false val wayLatLon: MutableList = ArrayList() receiverBean?.let { if (it.stopsList != null) { @@ -134,6 +185,14 @@ class DispatchAutoPilotManager private constructor() : ) } } + val currentAutoPilotLine = AutopilotControlParameters.AutoPilotLine(it.lineId.toLong(),it.trajUrl,it.trajMd5, + it.stopUrl,it.stopMd5,it.timestamp,it.vehicleModel,it.trajUrl_dpqp,it.trajMd5_dpqp,it.stopUrl_dpqp, + it.stopMd5_dpqp,it.timestamp_dpqp) + currentAutopilot.autoPilotLine = currentAutoPilotLine + currentAutopilot.routeID = it.lineId + currentAutopilot.routeName = it.lineName + currentAutopilot.startName = it.startLocAddress + currentAutopilot.endName = it.endLocAddress currentAutopilot.wayLatLons = wayLatLon currentAutopilot.startLatLon = AutopilotControlParameters.AutoPilotLonLat(it.startLat, it.startLon) @@ -141,20 +200,65 @@ class DispatchAutoPilotManager private constructor() : AutopilotControlParameters.AutoPilotLonLat(it.endLat, it.endLon) currentAutopilot.vehicleType = 10 CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "开启自动驾驶====$currentAutopilot") + Log.i(TAG,"开启自动驾驶====$currentAutopilot") CallerAutoPilotControlManager.startAutoPilot(currentAutopilot) } } fun affirm() { CallerHmiManager.dismissDispatchDialog() - dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM) + receiverBean?.taskId?.let { it -> + dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM, it, + onSuccess = { + //调用工控机开启自动驾驶 + startAutoPilot() + },onError = { error-> + ToastUtils.showShort("上报调度失败${error}") + }) + } + } + + /** + * 停止调度确认 + */ + fun stopAffirm(){ + CallerHmiManager.dismissDispatchDialog() + receiverBean?.taskId?.let{ + dispatchServiceModel.dispatchResultUpload(DISPATCH_STOP_AFFIRM, it, + onSuccess = { + //取消自动驾驶 + CallerAutoPilotControlManager.cancelAutoPilot() + Log.i(TAG,"stopAffirm 取消自动驾驶") + }, onError = {}) + } } fun cancel(manualTrigger: Boolean) { CallerHmiManager.dismissDispatchDialog() - dispatchServiceModel.dispatchResultUpload( - if (manualTrigger) DISPATCH_RESULT_MANUAL_CANCEL else DISPATCH_RESULT_TIMER_CANCEL - ) + receiverBean?.taskId?.let { + dispatchServiceModel.dispatchResultUpload( + if (manualTrigger) DISPATCH_RESULT_MANUAL_CANCEL else DISPATCH_RESULT_TIMER_CANCEL, it) + } + } + + /** + * 停止调度取消 + */ + fun stopCancel(manualTrigger: Boolean){ + CallerHmiManager.dismissDispatchDialog() + receiverBean?.taskId?.let{ + dispatchServiceModel.dispatchResultUpload( + if (manualTrigger) DISPATCH_STOP_MANUAL_CANCEL else DISPATCH_STOP_TIMER_CANCEL, it) + } + } + + /** + * 重启自驾 + */ + fun restartDispatch(){ + CallerHmiManager.dismissDispatchDialog() + //启动自动驾驶 + startAutoPilot() } override fun onCheck(isChecked: Boolean) { @@ -197,7 +301,7 @@ class DispatchAutoPilotManager private constructor() : SceneConstant.Companion.M_DISPATCH + TAG, "onArriveAt data : $arrivalNotification" ) - + Log.i(TAG,"onArriveAt data : $arrivalNotification") if (arrivalNotification.endLocation == null) { return } @@ -211,10 +315,65 @@ class DispatchAutoPilotManager private constructor() : SceneConstant.Companion.M_DISPATCH + TAG, "onArriveAt cal distance : $distanceFromSelf" ) + Log.i(TAG,"onArriveAt cal distance : $distanceFromSelf") if (distanceFromSelf < 10) { CallerLogger.d(SceneConstant.Companion.M_DISPATCH + TAG, "onArriveAt end location") isDispatch = false isArriveEnd = true + //到站,调度完成 + receiverBean?.let { + //调度完成,同步云端,并且吐司提示 + dispatchServiceModel.dispatchResultUpload(DISPATCH_COMPLETED, it.taskId) + ToastUtils.showLong("云调度完成,车辆已到达${it.endLocAddress}") + //取消自动驾驶 + CallerAutoPilotControlManager.cancelAutoPilot() + //语音提示到站 + AIAssist.getInstance(mContext).speakTTSVoice("云调度完成,车辆已到达${it.endLocAddress}") + } + } + } + + /** + * 接口MEC反馈的常规信息(MAP v2.5.0新增轨迹相关信息) + * @param guardianInfo + */ + override fun onAutopilotGuardian(guardianInfo: MogoReportMsg.MogoReportMessage?) { + if (guardianInfo == null || !guardianInfo.hasCode()) return + 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, + "IRECORDER_TASK_AUTO"//自动录包任务创建 + ->{ + //如果到达终点,则不处理 + 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.code)){ + Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_SUCCESS 轨迹管理_轨迹下载成功(本地已有对应轨迹也触发)") + }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.code)){ + Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_WARNING 轨迹管理_轨迹下载失败,本地有对应轨迹,认为成功") + }else if ("ISYS_INIT_TRAJECTORY_TIMEOUT".equals(guardianInfo.code)){ + Log.i(TAG,"onAutopilotGuardian ISYS_INIT_TRAJECTORY_TIMEOUT 轨迹管理_轨迹下载超时") } } @@ -243,7 +402,10 @@ class DispatchAutoPilotManager private constructor() : "AR453航班", "你车需执行编号ca1098次航班的引导任务,从A区A1到B区B1", System.currentTimeMillis(), - ArrayList() + ArrayList(), + 10, + 1, + "" ) receiverBean = adasAutoPilotLocReceiverBean CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean) @@ -265,7 +427,10 @@ class DispatchAutoPilotManager private constructor() : "", "", System.currentTimeMillis(), - ArrayList() + ArrayList(), + 10, + 1, + "" ) receiverBean = adasAutoPilotLocReceiverBean CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean) @@ -287,14 +452,19 @@ class DispatchAutoPilotManager private constructor() : "", "", System.currentTimeMillis(), - ArrayList() + ArrayList(), + 10, + 1, + "" ) receiverBean = adasAutoPilotLocReceiverBean CallerHmiManager.showDispatchDialog(adasAutoPilotLocReceiverBean) } private fun testDispatchResultUpload() { - dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM) + receiverBean?.taskId?.let { + dispatchServiceModel.dispatchResultUpload(DISPATCH_RESULT_AFFIRM, it) + } } } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt index 13a5aa2c10..0b1d759469 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/dispatch/network/DispatchServiceModel.kt @@ -23,6 +23,10 @@ class DispatchServiceModel private constructor() { const val DISPATCH_RESULT_AFFIRM = 0 const val DISPATCH_RESULT_MANUAL_CANCEL = 1 const val DISPATCH_RESULT_TIMER_CANCEL = 2 + const val DISPATCH_STOP_AFFIRM = 3 //云端终止指令-确认 + const val DISPATCH_STOP_TIMER_CANCEL = 4 //云端终止指令-超时拒绝 + const val DISPATCH_STOP_MANUAL_CANCEL = 5 //云端终止指令-手动拒绝 + const val DISPATCH_COMPLETED = 6 //调度完成 val dispatchServiceModel by lazy(LazyThreadSafetyMode.SYNCHRONIZED) { DispatchServiceModel() @@ -111,6 +115,7 @@ class DispatchServiceModel private constructor() { */ fun dispatchResultUpload( dispatchResultType: Int, + taskId: Long, onSuccess: ((BaseData) -> Unit)? = null, onError: ((String) -> Unit)? = null ) { @@ -118,7 +123,8 @@ class DispatchServiceModel private constructor() { val reportDispatchResult = ReportDispatchResult( sn, - dispatchResultType + dispatchResultType, + taskId ) val map: MutableMap = HashMap() map["sn"] = sn diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt index 2ce5f50f64..a2742b44fd 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/MoGoHmiProvider.kt @@ -221,6 +221,14 @@ class MoGoHmiProvider : IMoGoHmiProvider { } } + override fun showDispatchRestartDialog(msgData: DispatchAdasAutoPilotLocReceiverBean) { + ThreadUtils.runOnUiThread { + context?.let{ + DispatchDialogManager.getInstance(it).showRestartDialog(msgData) + } + } + } + override fun showNoticeForTrafficWithData(pushData: NoticeTrafficStylePushData?) { pushData?.let { ThreadUtils.runOnUiThread { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchBaseDialog.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchBaseDialog.java index fc45a75ce1..af93269f12 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchBaseDialog.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchBaseDialog.java @@ -3,17 +3,21 @@ package com.mogo.eagle.core.function.hmi.ui.notice; import android.app.Dialog; import android.content.Context; import android.os.Build; +import android.view.Gravity; +import android.view.ViewGroup; import android.view.WindowManager; +import android.widget.FrameLayout; import androidx.annotation.NonNull; import com.mogo.eagle.core.data.biz.dispatch.DispatchAdasAutoPilotLocReceiverBean; import com.mogo.eagle.core.function.hmi.R; +import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger; public abstract class DispatchBaseDialog extends Dialog { public DispatchBaseDialog(@NonNull Context context) { - super(context, R.style.Base_AlertDialog_AppCompat); + super(context,R.style.BaseFloatDialogStyle); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { getWindow().setType(WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY); } else { @@ -26,4 +30,22 @@ public abstract class DispatchBaseDialog extends Dialog { public abstract void showDialog(DispatchAdasAutoPilotLocReceiverBean dispatchContent); + @Override + public void show() { + super.show(); + setWindowSize(); + } + private void setWindowSize(){ + WindowManager.LayoutParams attributes = getWindow().getAttributes(); + attributes.width = ViewGroup.LayoutParams.MATCH_PARENT; + attributes.height = ViewGroup.LayoutParams.MATCH_PARENT; + FrameLayout content = (FrameLayout)findViewById(android.R.id.content); + if(content!=null){ + ViewGroup rootView = (ViewGroup) content.getChildAt(0); + FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) rootView.getLayoutParams(); + layoutParams.gravity = Gravity.CENTER; + rootView.setLayoutParams(layoutParams); + } + getWindow().setAttributes(attributes); + } } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchCarsDialog.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchCarsDialog.java index 5324063e86..d2d4446df3 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchCarsDialog.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchCarsDialog.java @@ -21,6 +21,10 @@ public class DispatchCarsDialog extends DispatchBaseDialog { private final TextView tvTimer; private final TextView tvLoc; + private final TextView tvAdasDispatchTitle; + private final TextView tvAdasDispatchRemindContent; + + private int dispatchType = 1;//调度类型:1:启动 2:停止 private final Handler handler = new Handler() { @Override @@ -44,21 +48,40 @@ public class DispatchCarsDialog extends DispatchBaseDialog { setCanceledOnTouchOutside(false); tvTimer = findViewById(R.id.module_adas_dispatch_remind_timer); tvLoc = findViewById(R.id.module_adas_dispatch_remind_loc); - Button btnAffirm = (Button) findViewById(R.id.module_adas_dispatch_remind_affirm); - Button btnCancel = (Button) findViewById(R.id.module_adas_dispatch_remind_cancel); + tvAdasDispatchTitle = findViewById(R.id.tv_adas_dispatch_title); + tvAdasDispatchRemindContent = findViewById(R.id.tv_adas_dispatch_remind_content); + Button btnAffirm = findViewById(R.id.module_adas_dispatch_remind_affirm); + Button btnCancel = findViewById(R.id.module_adas_dispatch_remind_cancel); tvTimer.setText(String.valueOf(TIMER)); btnAffirm.setOnClickListener(v -> { - CallerFuncBizManager.getBizProvider().dispatchAffirm(); + if(dispatchType == 1){ + //开始调度确认 + CallerFuncBizManager.getBizProvider().dispatchAffirm(); + }else if(dispatchType == 2){ + //停止调度确认 + CallerFuncBizManager.getBizProvider().stopDispatchAffirm(); + } dismissDialog(); }); btnCancel.setOnClickListener(v -> { - CallerFuncBizManager.getBizProvider().dispatchCancel(true); + if(dispatchType == 1){ + //开始调度手动取消 + CallerFuncBizManager.getBizProvider().dispatchCancel(true); + }else if(dispatchType == 2){ + //停止调度手动取消 + CallerFuncBizManager.getBizProvider().stopDispatchCancel(true); + } dismissDialog(); }); } private void hideDialog() { - CallerFuncBizManager.getBizProvider().dispatchCancel(false); + if(dispatchType == 1){ + //开始调度自动取消 + CallerFuncBizManager.getBizProvider().dispatchCancel(false); + }else if(dispatchType == 2){ + CallerFuncBizManager.getBizProvider().stopDispatchCancel(false); + } dismissDialog(); } @@ -74,6 +97,12 @@ public class DispatchCarsDialog extends DispatchBaseDialog { return; } show(); + if(dispatchContent.getType() == 2){ + //取消调度 + tvAdasDispatchTitle.setText("调度取消确认"); + tvAdasDispatchRemindContent.setText("车辆将取消到以下位置的自动驾驶"); + } + dispatchType = dispatchContent.getType(); handler.sendEmptyMessage(MSG_TYPE_TIMER); tvLoc.setText(dispatchContent.getEndLocAddress()); } diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchDialogManager.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchDialogManager.java index 6d6cf91503..457a1682e9 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchDialogManager.java +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchDialogManager.java @@ -53,16 +53,38 @@ public class DispatchDialogManager { } } - private void dispatchHengYang(DispatchAdasAutoPilotLocReceiverBean msgData) { - if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度 - if (dialog != null && dialog.isShowing()) { //避免下发两次 - return; - } - if (dialog == null) { - dialog = new DispatchCarsDialog(mContext); - } - dialog.showDialog(msgData); + /** + * 云调度重启自驾 + * @param msgData 长链下发实体 + */ + public void showRestartDialog(DispatchAdasAutoPilotLocReceiverBean msgData){ + if(isShowing()){ + return; } + if (msgData == null) { + return; + } + if (dialog != null && dialog.isShowing()) { //避免下发两次 + return; + } + if(dialog == null){ + dialog = new DispatchRestartDialog(mContext); + } + dialog.showDialog(msgData); + } + + private void dispatchHengYang(DispatchAdasAutoPilotLocReceiverBean msgData) { +// if (msgData.getType() == DISPATCH_TYPE_START) { //衡阳只有开始调度 +// } + //开始、取消调度 + if (dialog != null && dialog.isShowing()) { //避免下发两次 + return; + } + if (dialog == null) { + dialog = new DispatchCarsDialog(mContext); + } + dialog.showDialog(msgData); + } private void dispatchEZhou(DispatchAdasAutoPilotLocReceiverBean msgData) { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchRestartDialog.java b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchRestartDialog.java new file mode 100644 index 0000000000..341234ee7e --- /dev/null +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/notice/DispatchRestartDialog.java @@ -0,0 +1,29 @@ +package com.mogo.eagle.core.function.hmi.ui.notice; + +import android.content.Context; +import android.widget.TextView; + +import androidx.annotation.NonNull; + +import com.mogo.eagle.core.data.biz.dispatch.DispatchAdasAutoPilotLocReceiverBean; +import com.mogo.eagle.core.function.call.biz.CallerFuncBizManager; +import com.mogo.eagle.core.function.hmi.R; + +public class DispatchRestartDialog extends DispatchBaseDialog{ + + public DispatchRestartDialog(@NonNull Context context) { + super(context); + setContentView(R.layout.dialog_adas_dispatch_restart); + setCanceledOnTouchOutside(false); + TextView dispatchRestartEnter = findViewById(R.id.tv_dispatch_restart_enter); + dispatchRestartEnter.setOnClickListener(v -> { + //启动自动驾驶 + CallerFuncBizManager.getBizProvider().restartDispatchAffirm(); + }); + } + + @Override + public void showDialog(DispatchAdasAutoPilotLocReceiverBean dispatchContent) { + show(); + } +} diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_adas_dispatch_cars.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_adas_dispatch_cars.xml index c59c491014..1e69355fb1 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_adas_dispatch_cars.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/dialog_adas_dispatch_cars.xml @@ -19,6 +19,7 @@ app:layout_constraintTop_toTopOf="parent" /> + + + + + + + + + + + \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml index 53a55ecf6a..0fd755fc6b 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/values/strings.xml @@ -64,6 +64,9 @@ 航班信息: 接受任务 调度确认 + 提示 + 当前车辆已退出自动驾驶,请点击下方按钮恢复 + 进入自动驾驶 车辆将开启自动驾驶,并行驶至: 确认 取消 diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/DispatchAdasAutoPilotLocReceiverBean.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/DispatchAdasAutoPilotLocReceiverBean.java index 69f48a328c..4e32f60caf 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/DispatchAdasAutoPilotLocReceiverBean.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/DispatchAdasAutoPilotLocReceiverBean.java @@ -11,8 +11,8 @@ public class DispatchAdasAutoPilotLocReceiverBean { public static final int DISPATCH_TYPE_START = 1; public static final int DISPATCH_TYPE_STOP = 2; - private int source; // 1:站点调度 2:机场调度 - private int type; // 1:调度启动 2:调度停止 + private int source; // 1:衡阳 2:鄂州 + private int type; // 1:启动 2:停止 private String poiId; private double startLat; @@ -29,7 +29,31 @@ public class DispatchAdasAutoPilotLocReceiverBean { private long systemTime; private List stopsList; - public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, double startLon, String startLocAddress, double endLat, double endLon, String endLocAddress, String taskTime, String flightInfo, String taskInfo, long systemTime, List stopsList) { + private long taskId; //任务调度记录的ID + private int lineId; //路线Id + private String lineName; //路线名称 + + private String trajUrl; + private String trajMd5; + private String stopUrl; + private String stopMd5; + private long timestamp; + private String vehicleModel; + private String trajUrl_dpqp;//轨迹文件下载的cos url,默认“” + private String trajMd5_dpqp;//轨迹文件md5,默认“” + private String stopUrl_dpqp;//打点文件下载的cos url,默认“” + private String stopMd5_dpqp;//轨迹文件md5,默认“” + private long timestamp_dpqp;//上传轨迹完成时间戳(ms):用于MEC本地手动导入轨迹验证时不会被云端轨迹覆盖 + + public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, + double startLon, String startLocAddress, double endLat, + double endLon, String endLocAddress, String taskTime, + String flightInfo, String taskInfo, long systemTime, + List stopsList, long taskId, int lineId, + String lineName, String trajUrl, String trajMd5, + String stopUrl, String stopMd5, long timestamp, + String vehicleModel, String trajUrl_dpqp, String trajMd5_dpqp, + String stopUrl_dpqp, String stopMd5_dpqp, long timestamp_dpqp) { this.source = source; this.type = type; this.poiId = poiId; @@ -44,6 +68,43 @@ public class DispatchAdasAutoPilotLocReceiverBean { this.taskInfo = taskInfo; this.systemTime = systemTime; this.stopsList = stopsList; + this.taskId = taskId; + this.lineId = lineId; + this.lineName = lineName; + this.trajUrl = trajUrl; + this.trajMd5 = trajMd5; + this.stopUrl = stopUrl; + this.stopMd5 = stopMd5; + this.timestamp = timestamp; + this.vehicleModel = vehicleModel; + this.trajUrl_dpqp = trajUrl_dpqp; + this.trajMd5_dpqp = trajMd5_dpqp; + this.stopUrl_dpqp = stopUrl_dpqp; + this.stopMd5_dpqp = stopMd5_dpqp; + this.timestamp_dpqp = timestamp_dpqp; + } + + public DispatchAdasAutoPilotLocReceiverBean(int source, int type, String poiId, double startLat, double startLon, String startLocAddress, + double endLat, double endLon, String endLocAddress, String taskTime, String flightInfo, + String taskInfo, long systemTime, List stopsList, + long taskId, int lineId, String lineName) { + this.source = source; + this.type = type; + this.poiId = poiId; + this.startLat = startLat; + this.startLon = startLon; + this.startLocAddress = startLocAddress; + this.endLat = endLat; + this.endLon = endLon; + this.endLocAddress = endLocAddress; + this.taskTime = taskTime; + this.flightInfo = flightInfo; + this.taskInfo = taskInfo; + this.systemTime = systemTime; + this.stopsList = stopsList; + this.taskId = taskId; + this.lineId = lineId; + this.lineName = lineName; } public int getSource() { @@ -158,6 +219,118 @@ public class DispatchAdasAutoPilotLocReceiverBean { this.stopsList = stopsList; } + public long getTaskId(){ + return taskId; + } + + public void setTaskId(long taskId){ + this.taskId = taskId; + } + + public int getLineId(){ + return lineId; + } + + public void setLineId(int lineId){ + this.lineId =lineId; + } + + public String getLineName(){ + return lineName; + } + + public void setLineName(String lineName){ + this.lineName = lineName; + } + + public String getTrajUrl() { + return trajUrl; + } + + public void setTrajUrl(String trajUrl) { + this.trajUrl = trajUrl; + } + + public String getTrajMd5() { + return trajMd5; + } + + public void setTrajMd5(String trajMd5) { + this.trajMd5 = trajMd5; + } + + public String getStopUrl() { + return stopUrl; + } + + public void setStopUrl(String stopUrl) { + this.stopUrl = stopUrl; + } + + public String getStopMd5() { + return stopMd5; + } + + public void setStopMd5(String stopMd5) { + this.stopMd5 = stopMd5; + } + + public long getTimestamp() { + return timestamp; + } + + public void setTimestamp(long timestamp) { + this.timestamp = timestamp; + } + + public String getVehicleModel() { + return vehicleModel; + } + + public void setVehicleModel(String vehicleModel) { + this.vehicleModel = vehicleModel; + } + + public String getTrajUrl_dpqp() { + return trajUrl_dpqp; + } + + public void setTrajUrl_dpqp(String trajUrl_dpqp) { + this.trajUrl_dpqp = trajUrl_dpqp; + } + + public String getTrajMd5_dpqp() { + return trajMd5_dpqp; + } + + public void setTrajMd5_dpqp(String trajMd5_dpqp) { + this.trajMd5_dpqp = trajMd5_dpqp; + } + + public String getStopUrl_dpqp() { + return stopUrl_dpqp; + } + + public void setStopUrl_dpqp(String stopUrl_dpqp) { + this.stopUrl_dpqp = stopUrl_dpqp; + } + + public String getStopMd5_dpqp() { + return stopMd5_dpqp; + } + + public void setStopMd5_dpqp(String stopMd5_dpqp) { + this.stopMd5_dpqp = stopMd5_dpqp; + } + + public long getTimestamp_dpqp() { + return timestamp_dpqp; + } + + public void setTimestamp_dpqp(long timestamp_dpqp) { + this.timestamp_dpqp = timestamp_dpqp; + } + @Override public String toString() { return "DispatchAdasAutoPilotLocReceiverBean{" + @@ -175,6 +348,20 @@ public class DispatchAdasAutoPilotLocReceiverBean { ", taskInfo='" + taskInfo + '\'' + ", systemTime=" + systemTime + ", stopsList=" + stopsList + + ", taskId=" + taskId + + ", lineId=" + lineId + + ", lineName='" + lineName + '\'' + + ", trajUrl='" + trajUrl + '\'' + + ", trajMd5='" + trajMd5 + '\'' + + ", stopUrl='" + stopUrl + '\'' + + ", stopMd5='" + stopMd5 + '\'' + + ", timestamp=" + timestamp + + ", vehicleModel='" + vehicleModel + '\'' + + ", trajUrl_dpqp='" + trajUrl_dpqp + '\'' + + ", trajMd5_dpqp='" + trajMd5_dpqp + '\'' + + ", stopUrl_dpqp='" + stopUrl_dpqp + '\'' + + ", stopMd5_dpqp='" + stopMd5_dpqp + '\'' + + ", timestamp_dpqp=" + timestamp_dpqp + '}'; } } diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/ReportDispatchResult.java b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/ReportDispatchResult.java index 24bc5a0833..18099d2194 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/ReportDispatchResult.java +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/biz/dispatch/ReportDispatchResult.java @@ -4,10 +4,12 @@ public class ReportDispatchResult { private String sn; private int dispatchResult; + private long taskId; - public ReportDispatchResult(String sn, int dispatchResult) { + public ReportDispatchResult(String sn, int dispatchResult,long taskId) { this.sn = sn; this.dispatchResult = dispatchResult; + this.taskId = taskId; } public String getSn() { @@ -26,11 +28,20 @@ public class ReportDispatchResult { this.dispatchResult = dispatchResult; } + public long getTaskId() { + return taskId; + } + + public void setTaskId(long taskId) { + this.taskId = taskId; + } + @Override public String toString() { return "ReportDispatchResult{" + "sn='" + sn + '\'' + - ", dispatchResult=" + dispatchResult + + ", dispatchResult=" + dispatchResult + '\''+ + ", taskId=" + taskId + '}'; } } diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IMoGoFuncBizProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IMoGoFuncBizProvider.kt index 3179eafd81..def198adbf 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IMoGoFuncBizProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/biz/IMoGoFuncBizProvider.kt @@ -29,12 +29,28 @@ interface IMoGoFuncBizProvider : IMoGoFunctionServerProvider { */ fun dispatchAffirm() + /** + * 停止调度确认 + */ + fun stopDispatchAffirm() + /** * 调度取消 * @param manualTrigger 是否手动 */ fun dispatchCancel(manualTrigger: Boolean) + /** + * 停止调度取消 + * @param manualTrigger 是否手动 + */ + fun stopDispatchCancel(manualTrigger: Boolean) + + /** + * 调度重启自驾确认 + */ + fun restartDispatchAffirm() + /** * 调度测试 */ diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt index 557bb0de85..ab2d634ec4 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/hmi/warning/IMoGoHmiProvider.kt @@ -106,6 +106,11 @@ interface IMoGoHmiProvider :IProvider{ */ fun dismissDispatchDialog() + /** + * 调度重启自驾弹窗展示 + */ + fun showDispatchRestartDialog(msgData: DispatchAdasAutoPilotLocReceiverBean) + /** * 设置状态栏暗夜或明亮模式 * 默认 light diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt index b3ec411c75..eb9d33cdbe 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/hmi/CallerHmiManager.kt @@ -159,6 +159,12 @@ object CallerHmiManager { hmiProviderApi?.dismissDispatchDialog() } + /** + * 云调度重启自驾弹窗 + */ + fun showDispatchRestartDialog(msgData: DispatchAdasAutoPilotLocReceiverBean){ + hmiProviderApi?.showDispatchRestartDialog(msgData) + } fun showVideoDialog(infList: List) { hmiProviderApi?.showVideoDialog(infList) From bce4d3ed56c21ead08a1286898332a8e0eaec312 Mon Sep 17 00:00:00 2001 From: zhongchao Date: Thu, 13 Apr 2023 18:01:20 +0800 Subject: [PATCH 4/4] [2.15.0]fix bug of request url of roma --- .../business/ai/net/AiCloudIdentifyNetWorkModel.kt | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt index 7dfd4fbd24..57f6e064f3 100644 --- a/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt +++ b/core/function-impl/mogo-core-function-map/src/main/java/com/mogo/eagle/core/function/business/ai/net/AiCloudIdentifyNetWorkModel.kt @@ -1,6 +1,7 @@ package com.mogo.eagle.core.function.business.ai.net import com.mogo.cloud.passport.MoGoAiCloudClientConfig +import com.mogo.commons.constants.HostConst.getEagleHost import com.mogo.commons.debug.DebugConfig import com.mogo.eagle.core.data.BaseResponse import com.mogo.eagle.core.function.business.ai.AiCloudIdentifyDataManager.Companion.END_METRE @@ -17,17 +18,7 @@ class AiCloudIdentifyNetWorkModel private constructor(){ } } - private fun getHost(): String { - var host = "http://dzt-city.zhidaozhixing.com" - when (DebugConfig.getNetMode()) { - DebugConfig.NET_MODE_DEV, - DebugConfig.NET_MODE_QA -> host = "http://dzt-qa-city.zhidaozhixing.com" -// DebugConfig.NET_MODE_QA -> host = "http://dzt-test.zhidaozhixing.com" - } - return host - } - - private fun getNetWorkApi(baseUrl: String = getHost()): IAiCloudIdentifyApiService { + private fun getNetWorkApi(baseUrl: String = getEagleHost()): IAiCloudIdentifyApiService { return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl) .create(IAiCloudIdentifyApiService::class.java) }