Previously the assumption was made that the compiler
uses 32 bits for each enum value. This assumption was
invalid and meant that when reading/writing from
control_mode you would also read/write to enable_step_dir.
osPriorityNormal is the same priority as the communication task. If the USB pump task runs on the same priority, it sometimes fails to respond to the host in time, causing spurious halt conditions.
Before this commit, if the NVM is deemed valid and but the subsequent config load fails (e.g. because of a checksum mismatch), the motor config could be left in an undefined state.
Also a variable user_config_loaded is added to indicate whether the device is using user-saved config or factory defaults.
The official ODrive PID is 0x0D32 however the
firmware wrongly announced PID 0x0D33. This was already
fixed earlier but the fix was undone by CubeMX. This
commit also fixes the CubeMX setting.
When we changed the FreeRTOS heap to reside in the CCM,
we didn't update the CubeMX settings. This means CubeMX
would revert the change.
This commit fixes this.
When tup sees a change in environment variables, it needs to rebuild everything because it doesn't know if a process accessed the changed environment variable.
However these changes are frequent when changing between VSCode and terminal.
By disabling this check we trade a tiny bit of correctness for convenience.
exmplore_odrive.py no longer needs to be executed with
"ipython -i explore_odrive.py" but can launch an embedded IPython
command prompt by itself. If IPython is not available, the script falls
back to checking for normal python interactive mode.