mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-18 16:50:34 +08:00
Bootloader requires images be a multiple of 4 bytes; pad to comply.
This commit is contained in:
@@ -77,6 +77,10 @@ class firmware(object):
|
||||
|
||||
self.image = zlib.decompress(base64.b64decode(self.desc['image']))
|
||||
|
||||
# pad image to 4-byte length
|
||||
while ((len(self.image) % 4) != 0):
|
||||
self.image += b'\x00'
|
||||
|
||||
def property(self, propname):
|
||||
return self.desc[propname]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user