diff --git a/panda/board/obj/bootstub.panda.bin b/panda/board/obj/bootstub.panda.bin new file mode 100644 index 00000000..b60c59c5 Binary files /dev/null and b/panda/board/obj/bootstub.panda.bin differ diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed new file mode 100644 index 00000000..83523153 Binary files /dev/null and b/panda/board/obj/panda.bin.signed differ diff --git a/panda/python/__init__.py b/panda/python/__init__.py index d8c9de01..671157e7 100644 --- a/panda/python/__init__.py +++ b/panda/python/__init__.py @@ -116,23 +116,25 @@ class Panda: HW_TYPE_UNKNOWN = b'\x00' HW_TYPE_WHITE = b'\x01' HW_TYPE_BLACK = b'\x03' + HW_TYPE_DOS = b'\x06' HW_TYPE_RED_PANDA = b'\x07' HW_TYPE_TRES = b'\x09' HW_TYPE_CUATRO = b'\x0a' CAN_PACKET_VERSION = 4 - HEALTH_PACKET_VERSION = 17 + HEALTH_PACKET_VERSION = 16 CAN_HEALTH_PACKET_VERSION = 5 - HEALTH_STRUCT = struct.Struct(" Panda: HARDWARE.recover_internal_panda() raise - # skip flashing if the detected panda is not supported - supported_panda = check_panda_support(panda) - if not supported_panda: - cloudlog.warning(f"Panda {panda_serial} is not supported (hw_type: {panda.get_type()}), skipping flash...") - return panda - fw_signature = get_expected_signature(panda) internal_panda = panda.is_internal() @@ -67,14 +61,6 @@ def flash_panda(panda_serial: str) -> Panda: return panda -def check_panda_support(panda) -> bool: - hw_type = panda.get_type() - if hw_type in Panda.SUPPORTED_DEVICES: - return True - - return False - - def main() -> None: # signal pandad to close the relay and exit def signal_handler(signum, frame): @@ -99,6 +85,11 @@ def main() -> None: cloudlog.event("pandad.flash_and_connect", count=count) params.remove("PandaSignatures") + # TODO: remove this in the next AGNOS + # wait until USB is up before counting + if time.monotonic() < 60.: + no_internal_panda_count = 0 + # Handle missing internal panda if no_internal_panda_count > 0: if no_internal_panda_count == 3: @@ -148,12 +139,6 @@ def main() -> None: params.put("PandaSignatures", b','.join(p.get_signature() for p in pandas)) for panda in pandas: - # skip health check if the detected panda is not supported - supported_panda = check_panda_support(panda) - if not supported_panda: - cloudlog.warning(f"Panda {panda.get_usb_serial()} is not supported (hw_type: {panda.get_type()}), skipping health check...") - continue - # check health for lost heartbeat health = panda.health() if health["heartbeat_lost"]: