From f9a4aa48b9a5edd491b52514de34b1ee0d0e5f3f Mon Sep 17 00:00:00 2001 From: zhaohe Date: Wed, 6 Sep 2023 08:08:47 +0800 Subject: [PATCH] update --- components/step_motor_45/step_motor_45.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/components/step_motor_45/step_motor_45.cpp b/components/step_motor_45/step_motor_45.cpp index f678283..772014c 100644 --- a/components/step_motor_45/step_motor_45.cpp +++ b/components/step_motor_45/step_motor_45.cpp @@ -61,6 +61,7 @@ void StepMotor45::rotate(int direction, int speed) { CriticalContext cc; if (direction == 0) { stop(); + return; } if (direction > 0) {