will fall through to idle
Disable motor PWM and do nothing.
Run the startup procedure.
the actual sequence is defined by the config.startup… flags
Run motor calibration and then encoder offset calibration (or encoder index search if
Measure phase resistance and phase inductance of the motor.
Turn the motor in one direction until the encoder index is traversed.
This state can only be entered if encoder.config.use_index is
Turn the motor in one direction for a few seconds and then back to measure the offset between the encoder position and the electrical phase.
Run closed loop control.
Run lockin spin.
Run encoder direction search.
Can only be entered if the motor is calibrated (motor.is_calibrated).
Run axis homing function.
Endstops must be enabled to use this feature.
Rotate the motor in lockin and calibrate hall polarity
ODrive assumes 120 degree electrical hall spacing. This routine determines if that is the case and sets the polarity if the halls are on 60 degree electrical spacing
Rotate the motor for 30s to calibrate hall sensor edge offsets
The phase offset is not calibrated at this time, so the map is only relative