From 7d28777c61cf04ca3dfc629c3fbaf43f3f1582c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=87=A4=E5=90=89?= Date: Fri, 13 Jun 2025 17:17:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=80=9F=E5=BA=A6=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E8=BD=AC=E9=80=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iflytop/gd/hardware/utils/Math/StepMotorConverter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/iflytop/gd/hardware/utils/Math/StepMotorConverter.java b/src/main/java/com/iflytop/gd/hardware/utils/Math/StepMotorConverter.java index a52184f..53d4f62 100644 --- a/src/main/java/com/iflytop/gd/hardware/utils/Math/StepMotorConverter.java +++ b/src/main/java/com/iflytop/gd/hardware/utils/Math/StepMotorConverter.java @@ -65,7 +65,7 @@ public class StepMotorConverter { */ public static int toMotorSpeed(double speed, double S) { - return (int)(speed * 60.0 / S); + return (int)speed; } /** @@ -76,6 +76,6 @@ public class StepMotorConverter { */ public static double toUserSpeed(int motorSpeed, double S) { - return (double)motorSpeed * S / 60.0; + return (double) motorSpeed; } }