From 40c078909a4fff0e2c2c071adc6ab98beac061da Mon Sep 17 00:00:00 2001 From: renwj Date: Thu, 18 Apr 2024 18:31:23 +0800 Subject: [PATCH] =?UTF-8?q?[6.4.0][=E5=90=AF=E8=87=AA=E9=A9=BE=E6=8C=87?= =?UTF-8?q?=E5=BC=95]=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../status/flow/autopilot/SpeedImpl.kt | 3 ++- .../status/ui/AutoPilotLaunchBeforeView.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/autopilot/SpeedImpl.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/autopilot/SpeedImpl.kt index 9978b4ce60..23448af35f 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/autopilot/SpeedImpl.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/flow/autopilot/SpeedImpl.kt @@ -27,7 +27,7 @@ internal class SpeedImpl(ctx: Context): IFlow(ctx), IMoGoChassisLoc private var last: Float? = null override fun onCreate() { - CallerChassisLocationGCJ02ListenerManager.addListener(TAG, this) + CallerChassisLocationGCJ02ListenerManager.addListener(TAG, 5, this) } override fun onDestroy() { @@ -41,4 +41,5 @@ internal class SpeedImpl(ctx: Context): IFlow(ctx), IMoGoChassisLoc last = mogoLocation?.gnssSpeed } } + } \ No newline at end of file diff --git a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/ui/AutoPilotLaunchBeforeView.kt b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/ui/AutoPilotLaunchBeforeView.kt index 0f3c196660..1d8e9f59ca 100644 --- a/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/ui/AutoPilotLaunchBeforeView.kt +++ b/core/function-impl/mogo-core-function-devatools/src/main/java/com/zhjt/mogo_core_function_devatools/status/ui/AutoPilotLaunchBeforeView.kt @@ -35,6 +35,7 @@ import kotlinx.android.synthetic.main.layout_autopilot_launch_before.view.iv_ste import kotlinx.android.synthetic.main.layout_autopilot_launch_before.view.speed import kotlinx.android.synthetic.main.layout_autopilot_launch_before.view.tv_brake_or_accelerator import me.jessyan.autosize.utils.AutoSizeUtils +import kotlin.math.abs class AutoPilotLaunchBeforeView: LinearLayout, IStatusListener { @@ -102,7 +103,7 @@ class AutoPilotLaunchBeforeView: LinearLayout, IStatusListener { iv_steer?.isSelected = isError } is SpeedStatus -> { - speed?.text = "${status.speed.toInt()}" + speed?.text = "${(abs(status.speed) * 3.6f).toInt()}" } else -> { Logger.d(TAG, "other state: $status")