File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ Therefore this is an attempt to:
21
21
> NEXT RELEASE 📢: <span class =" simple " >Simple<span class =" foc " >FOC</span >library</span > v2.2.2
22
22
> - GenericCurrentSense bugfix and testing
23
23
> - bugfix leonardo #170
24
+ > - bugfix - no index search after specifying natural direction
24
25
> - Odrive example code see ` examples/hardware_specific/odrive_example `
25
26
> - Low level API restructuring
26
27
> - Driver API
Original file line number Diff line number Diff line change @@ -162,12 +162,13 @@ int BLDCMotor::alignSensor() {
162
162
int exit_flag = 1 ; // success
163
163
SIMPLEFOC_DEBUG (" MOT: Align sensor." );
164
164
165
+ // check if sensor needs zero search
166
+ if (sensor->needsSearch ()) exit_flag = absoluteZeroSearch ();
167
+ // stop init if not found index
168
+ if (!exit_flag) return exit_flag;
169
+
165
170
// if unknown natural direction
166
171
if (!_isset (sensor_direction)){
167
- // check if sensor needs zero search
168
- if (sensor->needsSearch ()) exit_flag = absoluteZeroSearch ();
169
- // stop init if not found index
170
- if (!exit_flag) return exit_flag;
171
172
172
173
// find natural direction
173
174
// move one electrical revolution forward
You can’t perform that action at this time.
0 commit comments