From a373714ed1f21d864f8438a0534d7bb13d9fcce5 Mon Sep 17 00:00:00 2001 From: Richard Unger Date: Tue, 26 Sep 2023 09:04:37 +0200 Subject: [PATCH] fix initialization error for StepperMotors --- src/StepperMotor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/StepperMotor.cpp b/src/StepperMotor.cpp index 491a20ee..a22496ba 100644 --- a/src/StepperMotor.cpp +++ b/src/StepperMotor.cpp @@ -134,7 +134,7 @@ int StepperMotor::alignSensor() { SIMPLEFOC_DEBUG("MOT: Align sensor."); // if unknown natural direction - if(!_isset(sensor_direction)){ + if(sensor_direction == Direction::UNKNOWN){ // check if sensor needs zero search if(sensor->needsSearch()) exit_flag = absoluteZeroSearch(); // stop init if not found index