Skip to content

Commit

Permalink
use logger info instead of warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dzid26 committed Oct 3, 2024
1 parent fab8d0b commit 2d75d25
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,30 +515,30 @@ def flash_static(handle, code, mcu_type):
assert last_sector < 7, "Binary too large! Risk of overwriting provisioning chunk."

# unlock flash
logger.warning("flash: unlocking")
logger.info("flash: unlocking")
handle.controlWrite(Panda.REQUEST_IN, 0xb1, 0, 0, b'')

# erase sectors
logger.warning(f"flash: erasing sectors 1 - {last_sector}")
logger.info(f"flash: erasing sectors 1 - {last_sector}")
for i in range(1, last_sector + 1):
handle.controlWrite(Panda.REQUEST_IN, 0xb2, i, 0, b'')

# flash over EP2
STEP = 0x10
logger.warning("flash: flashing")
logger.info("flash: flashing")
for i in range(0, len(code), STEP):
handle.bulkWrite(2, code[i:i + STEP])

# reset
logger.warning("flash: resetting")
logger.info("flash: resetting")
try:
handle.controlWrite(Panda.REQUEST_IN, 0xd8, 0, 0, b'', expect_disconnect=True)
except Exception:
pass

def flash(self, fn=None, code=None, reconnect=True):
if self.up_to_date(fn=fn):
logger.debug("flash: already up to date")
logger.info("flash: already up to date")
return

if not fn:
Expand Down

0 comments on commit 2d75d25

Please sign in to comment.