Skip to content

Commit

Permalink
Update CurrentSense.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric authored Jul 20, 2024
1 parent 996f312 commit bd21d2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/base_classes/CurrentSense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ int CurrentSense::alignStepperDriver(float voltage, StepperDriver* stepper_drive

// phase B should be aligned
// 1) we just need to verify that it has been measured
if (fabs(c.a) < 0.1f && fabs(c.b) < 0.1f ){
SIMPLEFOC_DEBUG("CS: Err too low current!");
if (fabs(c.b) < 0.1f ){
SIMPLEFOC_DEBUG("CS: Err too low current on B!");
return 0; // measurement current too low
}
// 2) check if measured current a is positive and invert if not
Expand Down

0 comments on commit bd21d2b

Please sign in to comment.