vedderb / bldc

The VESC motor control firmware
2.18k stars 1.35k forks source link

Resample shutdown before disabling gates in ALWAYS_OFF mode #697

Closed dcodeIO closed 9 months ago

dcodeIO commented 9 months ago

Fixes #686 by resampling the shutdown switch in ALWAYS_OFF mode after cleanup code has run.

Previously, gates were unconditionally disabled, even if the shutdown switch has been turned back to ON state during a potentially long-running shutdown-hold true ... shutdown-hold false sequence, in effect shutting down the system immediately on subsequent shutdown switch activations instead of firing event-shutdown again.

vedderb commented 9 months ago

Nice work!