mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-18 01:18:52 +08:00
Fix index out of range error when using dfu switch and dfu flashing
This commit is contained in:
@@ -53,4 +53,4 @@ def find_any(path=default_search_path, serial_number=None,
|
||||
channel_termination_token.set()
|
||||
raise
|
||||
|
||||
return result[0]
|
||||
return result[0] if len(result) > 0 else None
|
||||
|
||||
+5
-4
@@ -32,14 +32,14 @@ to publish packages with the name odrive.
|
||||
"""
|
||||
|
||||
# Set to true to make the current release
|
||||
is_release = True
|
||||
is_release = False
|
||||
|
||||
# Set to true to make an official post-release, rather than dev of new version
|
||||
is_post_release = False
|
||||
post_rel_num = 0
|
||||
|
||||
# To test higher numbered releases, bump to the next rev
|
||||
devnum = 0
|
||||
devnum = 6
|
||||
bump_rev = not is_post_release and not is_release
|
||||
|
||||
# TODO: add additional y/n prompt to prevent from erroneous upload
|
||||
@@ -67,8 +67,9 @@ version = odrive.version.get_version_str(
|
||||
if creating_package:
|
||||
if is_post_release:
|
||||
version += str(post_rel_num)
|
||||
elif (devnum > 0):
|
||||
version += str(devnum)
|
||||
#elif (devnum > 0):
|
||||
# version += str(devnum)
|
||||
version+= str(devnum)
|
||||
|
||||
version_file_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'odrive', 'version.txt')
|
||||
with open(version_file_path, mode='w') as version_file:
|
||||
|
||||
Reference in New Issue
Block a user