mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-18 17:23:52 +08:00
dfu: fix small writes
This commit is contained in:
@@ -77,7 +77,7 @@ class STBootloaderUSBHandle(BaseSTBootloaderHandle):
|
||||
self._status()
|
||||
|
||||
# Program
|
||||
bs = self._mcu_type.config.block_size
|
||||
bs = min(len(dat), self._mcu_type.config.block_size)
|
||||
dat += b"\xFF" * ((bs - len(dat)) % bs)
|
||||
for i in range(0, len(dat) // bs):
|
||||
ldat = dat[i * bs:(i + 1) * bs]
|
||||
|
||||
Reference in New Issue
Block a user