From 0ce73a996fd471e7d89eeb14005c5b3ad11b6731 Mon Sep 17 00:00:00 2001 From: xinfengkun Date: Mon, 16 Dec 2024 14:54:33 +0800 Subject: [PATCH] =?UTF-8?q?[684][data-center]=E4=B8=8B=E8=BD=BD=E8=BD=A8?= =?UTF-8?q?=E8=BF=B9=E8=AF=B7=E6=B1=82=E8=B0=83=E7=94=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autopilot/MoGoAutopilotControlProvider.kt | 8 ++++---- .../autopilot/IMoGoAutopilotControlProvider.kt | 4 ++-- .../autopilot/CallerAutoPilotControlManager.kt | 18 ++++++++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt index c35388c799..e5fa39a20d 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/autopilot/MoGoAutopilotControlProvider.kt @@ -456,8 +456,8 @@ class MoGoAutopilotControlProvider : autoPilotLine: AutopilotControlParameters.AutoPilotLine, routeInfo: MessagePad.RouteInfo?, orderId: String? - ) { - AdasManager.getInstance() + ): Long { + return AdasManager.getInstance() .sendTrajectoryDownloadReq(autoPilotLine.toAutoPilotLine(), routeInfo, orderId) } @@ -466,8 +466,8 @@ class MoGoAutopilotControlProvider : downloadType: Int, routeInfo: MessagePad.RouteInfo?, orderId: String? - ) { - AdasManager.getInstance().sendTrajectoryDownloadReq( + ): Long { + return AdasManager.getInstance().sendTrajectoryDownloadReq( autoPilotLine.toAutoPilotLine(), downloadType, routeInfo, diff --git a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt index 44a6df9928..7ab4c56aa4 100644 --- a/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt +++ b/core/mogo-core-function-api/src/main/java/com/mogo/eagle/core/function/api/autopilot/IMoGoAutopilotControlProvider.kt @@ -61,7 +61,7 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider { * @param autoPilotLine 线路相关参数详情见PB message_pad.proto -> Line * @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填! */ - fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, routeInfo: MessagePad.RouteInfo?, orderId:String?) + fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, routeInfo: MessagePad.RouteInfo?, orderId:String?): Long /** * 发送 轨迹下载请求 @@ -70,7 +70,7 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider { * @param downloadType 下载类型: 0:正常下载 1:预下载 * @param routeInfo 20240523 进行自动算路,务必下单时候携带自动驾驶路径信息,否则可不填! */ - fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, routeInfo: MessagePad.RouteInfo?, orderId:String?) + fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int, routeInfo: MessagePad.RouteInfo?, orderId:String?): Long /** * 结束自动驾驶 */ diff --git a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt index 4fcd1caeb3..9838ea0c44 100644 --- a/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt +++ b/core/mogo-core-function-call/src/main/java/com/mogo/eagle/core/function/call/autopilot/CallerAutoPilotControlManager.kt @@ -206,36 +206,42 @@ object CallerAutoPilotControlManager { /** * 发送 轨迹下载请求。带有Routing的参数,让MAP进行离线算路。 */ - fun sendTrajectoryDownloadReq(autopilotControlParameters: AutopilotControlParameters,downloadType: Int=0) { + fun sendTrajectoryDownloadReq(autopilotControlParameters: AutopilotControlParameters,downloadType: Int=0): Long { + var result = -1L if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { // Routing 需要传参 routeInfo - providerApi?.sendTrajectoryDownloadReq(autopilotControlParameters.autoPilotLine!!, autopilotControlParameters.toRouteInfo(),"") + result = providerApi?.sendTrajectoryDownloadReq(autopilotControlParameters.autoPilotLine!!, autopilotControlParameters.toRouteInfo(), "") ?: -1L CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autopilotControlParameters.autoPilotLine!!, downloadType) } + return result } /** * 发送 轨迹下载请求 * @param autoPilotLine 启动算路参数 */ - fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine) { + fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine): Long { + var result = -1L if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { //TODO Routing 需要传参 routeInfo,这里建议业务侧重新整合到同一个数据实体内传入 - providerApi?.sendTrajectoryDownloadReq(autoPilotLine, null,"") + result = providerApi?.sendTrajectoryDownloadReq(autoPilotLine, null, "") ?: -1L CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, 0) } + return result } /** * 发送 轨迹下载请求 * @param downloadType 下载类型: 0:正常下载 1:预下载 */ - fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int) { + fun sendTrajectoryDownloadReq(autoPilotLine: AutopilotControlParameters.AutoPilotLine, downloadType: Int): Long { + var result = -1L if (AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { //TODO Routing 需要传参 routeInfo,这里建议业务侧重新整合到同一个数据实体内传入 - providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType, null,"") + result = providerApi?.sendTrajectoryDownloadReq(autoPilotLine, downloadType, null, "") ?: -1L CallerAutoPilotStatusListenerManager.invokeTrajectoryDownloadReq(autoPilotLine, downloadType) } + return result } /**