Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dronecan_gui_tool/widgets/file_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ def _load_image(self, path):
print("Missing hex image in %s" % path)
return None
return hex2bin(base64.b64decode(j['hex']))
if path.lower().endswith('.hex'):
# intel hex image
h = open(path,'rb').read()
return hex2bin(h)
return open(path,'rb').read()

def _check_path_change(self, path):
Expand Down
2 changes: 1 addition & 1 deletion dronecan_gui_tool/widgets/node_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def _do_firmware_update(self):

# Requesting the firmware path
fw_file = QFileDialog().getOpenFileName(self, 'Select firmware file', '',
'Binary images (*.bin);;ArduPilot Firmware (*.apj);;AM32 Firmware (*.amj);;PX4 Firmware (*.px4);;All files (*.*)')
'Binary images (*.bin);;ArduPilot Firmware (*.apj);;AM32 Firmware (*.amj);;PX4 Firmware (*.px4);;Hex (*.hex);;All files (*.*)')
if not fw_file[0]:
self.window().show_message('Cancelled')
return
Expand Down