Merge branch 'devel' into preroll

This commit is contained in:
Oskar Weigl
2018-10-08 18:11:27 -07:00
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -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
+3 -3
View File
@@ -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))