mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 20:28:37 +08:00
make_can_boot_descriptor:Get padding math correct
This commit is contained in:
committed by
Daniel Agar
parent
1ac70cc72f
commit
529841ba7c
@@ -182,7 +182,7 @@ class FirmwareImage(object):
|
|||||||
self._contents.seek(0, os.SEEK_END)
|
self._contents.seek(0, os.SEEK_END)
|
||||||
self._length = self._contents.tell()
|
self._length = self._contents.tell()
|
||||||
if self._padding:
|
if self._padding:
|
||||||
fill = self._length % self._padding
|
fill = self._padding - (self._length % self._padding)
|
||||||
if fill:
|
if fill:
|
||||||
self._length += fill
|
self._length += fill
|
||||||
self._padding = fill
|
self._padding = fill
|
||||||
|
|||||||
Reference in New Issue
Block a user