mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 01:33:52 +08:00
pre-commit: autoupdate hooks (#1639)
* Update pre-commit hook versions * fix --------- Co-authored-by: adeebshihadeh <adeebshihadeh@users.noreply.github.com>
This commit is contained in:
@@ -78,7 +78,7 @@ class STBootloaderUSBHandle(BaseSTBootloaderHandle):
|
||||
# Program
|
||||
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):
|
||||
for i in range(len(dat) // bs):
|
||||
ldat = dat[i * bs:(i + 1) * bs]
|
||||
print("programming %d with length %d" % (i, len(ldat)))
|
||||
self._libusb_handle.controlWrite(0x21, self.DFU_DNLOAD, 2 + i, 0, ldat)
|
||||
|
||||
Reference in New Issue
Block a user