|
|
@ -26,7 +26,7 @@ def flash_panda(panda_serial: str) -> Panda: |
|
|
|
panda = Panda(panda_serial) |
|
|
|
panda = Panda(panda_serial) |
|
|
|
|
|
|
|
|
|
|
|
fw_signature = get_expected_signature(panda) |
|
|
|
fw_signature = get_expected_signature(panda) |
|
|
|
internal_panda = panda.is_internal() and not panda.bootstub |
|
|
|
internal_panda = panda.is_internal() |
|
|
|
|
|
|
|
|
|
|
|
panda_version = "bootstub" if panda.bootstub else panda.get_version() |
|
|
|
panda_version = "bootstub" if panda.bootstub else panda.get_version() |
|
|
|
panda_signature = b"" if panda.bootstub else panda.get_signature() |
|
|
|
panda_signature = b"" if panda.bootstub else panda.get_signature() |
|
|
@ -39,7 +39,7 @@ def flash_panda(panda_serial: str) -> Panda: |
|
|
|
|
|
|
|
|
|
|
|
if panda.bootstub: |
|
|
|
if panda.bootstub: |
|
|
|
bootstub_version = panda.get_version() |
|
|
|
bootstub_version = panda.get_version() |
|
|
|
cloudlog.info(f"Flashed firmware not booting, flashing development bootloader. Bootstub version: {bootstub_version}") |
|
|
|
cloudlog.info(f"Flashed firmware not booting, flashing development bootloader. {bootstub_version=}, {internal_panda=}") |
|
|
|
if internal_panda: |
|
|
|
if internal_panda: |
|
|
|
HARDWARE.recover_internal_panda() |
|
|
|
HARDWARE.recover_internal_panda() |
|
|
|
panda.recover(reset=(not internal_panda)) |
|
|
|
panda.recover(reset=(not internal_panda)) |
|
|
@ -95,7 +95,7 @@ def main() -> NoReturn: |
|
|
|
panda_serials = Panda.list() |
|
|
|
panda_serials = Panda.list() |
|
|
|
if len(panda_serials) == 0: |
|
|
|
if len(panda_serials) == 0: |
|
|
|
if first_run: |
|
|
|
if first_run: |
|
|
|
cloudlog.info("Resetting internal panda") |
|
|
|
cloudlog.info("No pandas found, resetting internal panda") |
|
|
|
HARDWARE.reset_internal_panda() |
|
|
|
HARDWARE.reset_internal_panda() |
|
|
|
time.sleep(2) # wait to come back up |
|
|
|
time.sleep(2) # wait to come back up |
|
|
|
continue |
|
|
|
continue |
|
|
|