Skip to content

Commit

Permalink
Fix python DFU firmware version prerelease status resolution to use c…
Browse files Browse the repository at this point in the history
…orrect attribute
  • Loading branch information
clintlombard committed Jun 17, 2021
1 parent a1338ac commit c585859
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Unreleased Features
Please add a note of your changes below this heading if you make a Pull Request.
* Fix python DFU firmware version prerelease status resolution to use correct attribute

# Releases
## [0.5.3] - unreleased
Expand Down
2 changes: 1 addition & 1 deletion tools/odrive/dfu.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def update_device(device, firmware, logger, cancellation_token):
fw_version_major = device.fw_version_major if hasattr(device, 'fw_version_major') else 0
fw_version_minor = device.fw_version_minor if hasattr(device, 'fw_version_minor') else 0
fw_version_revision = device.fw_version_revision if hasattr(device, 'fw_version_revision') else 0
fw_version_prerelease = device.fw_version_prerelease if hasattr(device, 'fw_version_prerelease') else True
fw_version_prerelease = device.fw_version_unreleased != 0 if hasattr(device, 'fw_version_unreleased') else True
fw_version = (fw_version_major, fw_version_minor, fw_version_revision, fw_version_prerelease)

print("Found ODrive {} ({}) with firmware {}{}".format(
Expand Down

0 comments on commit c585859

Please sign in to comment.