diff --git a/CHANGELOG.md b/CHANGELOG.md index 07a30ae6..71edf5d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Unreleased Features Please add a note of your changes below this heading if you make a Pull Request. +## Fixed +* Would ERROR_CONTROL_DEADLINE_MISSED along with every ERROR_PHASE_RESISTANCE_OUT_OF_RANGE. + # Releases ## [0.4.6] - 2018-10-07 ### Fixed diff --git a/tools/odrive/dfu.py b/tools/odrive/dfu.py index 6283b81a..9dc5f6d9 100755 --- a/tools/odrive/dfu.py +++ b/tools/odrive/dfu.py @@ -338,8 +338,8 @@ def update_device(device, firmware, logger, cancellation_token): # Back up configuration if dfudev is None: - did_backup_config = device.user_config_loaded if hasattr(device, 'user_config_loaded') else False - if did_backup_config: + do_backup_config = device.user_config_loaded if hasattr(device, 'user_config_loaded') else False + if do_backup_config: odrive.configuration.backup_config(device, None, logger) elif not odrive.utils.yes_no_prompt("The configuration cannot be backed up because the device is already in DFU mode. The configuration may be lost after updating. Do you want to continue anyway?", True): raise OperationAbortedException() @@ -414,7 +414,7 @@ def update_device(device, firmware, logger, cancellation_token): device = odrive.find_any("usb", serial_number, cancellation_token, cancellation_token, timeout=30) - if did_backup_config: + if do_backup_config: odrive.configuration.restore_config(device, None, logger) os.remove(odrive.configuration.get_temp_config_filename(device))