We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef22c4c commit 0622b9fCopy full SHA for 0622b9f
1 file changed
src/common/base_classes/FOCMotor.cpp
@@ -938,8 +938,9 @@ int FOCMotor::absoluteZeroSearch() {
938
voltage_limit = voltage_sensor_align;
939
shaft_angle = 0;
940
// TODO: Try the dedicated method for converting mec and elec angles
941
- while(sensor->needsSearch() && shaft_angle < pole_pairs*_2PI){
942
- angleOpenloop(pole_pairs*1.5f*_2PI);
+ float search_rotation_target = _electricalAngle(1.5f*_2PI, pole_pairs)
+ while(sensor->needsSearch() && shaft_angle < search_rotation_target){
943
+ angleOpenloop(search_rotation_target);
944
// call important for some sensors not to loose count
945
// not needed for the search
946
sensor->update();
0 commit comments