mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-09-26 03:23:39 +08:00
Reboot on erase_configuration().
This avoids unexpected behavior of a subsequent `save_configuration()` call, since the configuration is only erased from NVM, not from RAM.
This commit is contained in:
@@ -35,6 +35,7 @@ Please add a note of your changes below this heading if you make a Pull Request.
|
||||
* Fixed a firmware hang that could occur from unlikely but possible user input
|
||||
* Added JSON caching to Fibre. This drastically reduces the time odrivetool needs to connect to an ODrive (except for the first time or after firmware updates).
|
||||
* Fix IPython `RuntimeWarning` that would occur every time `odrivetool` was started.
|
||||
* Reboot on `erase_configuration()`. This avoids unexpected behavior of a subsequent `save_configuration()` call, since the configuration is only erased from NVM, not from RAM.
|
||||
|
||||
# Releases
|
||||
## [0.4.11] - 2019-07-25
|
||||
|
||||
@@ -95,6 +95,13 @@ extern "C" int load_configuration(void) {
|
||||
|
||||
void erase_configuration(void) {
|
||||
NVM_erase();
|
||||
|
||||
// FIXME: this reboot is a workaround because we don't want the next save_configuration
|
||||
// to write back the old configuration from RAM to NVM. The proper action would
|
||||
// be to reset the values in RAM to default. However right now that's not
|
||||
// practical because several startup actions depend on the config. The
|
||||
// other problem is that the stack overflows if we reset to default here.
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void enter_dfu_mode() {
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ Using the motor current and the known KV of your motor you can estimate the moto
|
||||
All variables that are part of a `[...].config` object can be saved to non-volatile memory on the ODrive so they persist after you remove power. The relevant commands are:
|
||||
|
||||
* `<odrv>.save_configuration()`: Stores the configuration to persistent memory on the ODrive.
|
||||
* `<odrv>.erase_configuration()`: Resets the configuration variables to their factory defaults. This only has an effect after a reboot. A side effect of this command is that motor control stops (in case it was running) and the USB communication breaks out temporarily. This is because erasing flash pages hangs the microcontroller for several seconds.
|
||||
* `<odrv>.erase_configuration()`: Resets the configuration variables to their factory defaults. This also reboots the device.
|
||||
|
||||
### Diagnostics
|
||||
|
||||
|
||||
Reference in New Issue
Block a user