From b0c565e6ac0097836a836a2094ff8b0961c669a4 Mon Sep 17 00:00:00 2001 From: chenfufeng Date: Thu, 31 Mar 2022 14:21:29 +0800 Subject: [PATCH] =?UTF-8?q?[Fix]=E8=A7=A3=E5=86=B3=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E6=94=B9=E5=8F=98=E5=AF=BC=E8=87=B4=E7=9A=84=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=A9=BE=E9=A9=B6=E9=80=9F=E5=BA=A6=E7=9A=84=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../eagle/core/function/autopilot/MoGoAutopilotProvider.kt | 2 +- .../core/function/api/autopilot/IMoGoAutopilotProvider.kt | 3 +++ .../core/function/call/autopilot/CallerAutoPilotManager.kt | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) 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 b31bd57da7..81a24b71e5 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 @@ -284,7 +284,7 @@ class MoGoAutopilotProvider : } override fun setAutoPilotSpeed(speed: Int): Boolean { - return AdasManager.getInstance().sendAutopilotSpeedReq(speed.toDouble()) + return AdasManager.getInstance().sendAutopilotSpeedReq(speed/3.6) } override fun setIPCShutDown() { 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 3650904216..3b1f2c7237 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 @@ -86,6 +86,9 @@ interface IMoGoAutopilotProvider : IMoGoFunctionServerProvider { */ fun setEnableLog(isEnableLog: Boolean) + /** + * speed单位:km/h + */ fun setAutoPilotSpeed(speed: Int): 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 0c60fede33..daee04f7ff 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 @@ -95,6 +95,9 @@ object CallerAutoPilotManager { providerApi?.setEnableLog(isEnableLog) } + /** + * speed单位:km/h + */ fun setAutoPilotSpeed(speed: Int): Boolean { return providerApi?.setAutoPilotSpeed(speed) ?: false }