mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
Uploader: Make sure to warn about wrong board type
This commit is contained in:
@@ -449,8 +449,9 @@ class uploader(object):
|
|||||||
if self.board_type != fw.property('board_id'):
|
if self.board_type != fw.property('board_id'):
|
||||||
msg = "Firmware not suitable for this board (board_type=%u board_id=%u)" % (
|
msg = "Firmware not suitable for this board (board_type=%u board_id=%u)" % (
|
||||||
self.board_type, fw.property('board_id'))
|
self.board_type, fw.property('board_id'))
|
||||||
|
print("WARNING: %s" % msg)
|
||||||
if args.force:
|
if args.force:
|
||||||
print("WARNING: %s" % msg)
|
print("FORCED WRITE, FLASHING ANYWAY!")
|
||||||
else:
|
else:
|
||||||
raise IOError(msg)
|
raise IOError(msg)
|
||||||
if self.fw_maxsize < fw.property('image_size'):
|
if self.fw_maxsize < fw.property('image_size'):
|
||||||
|
|||||||
Reference in New Issue
Block a user