bye bye f4 (#2259)

* bye bye f4

* lil more

* fix mac build

* update health idx
This commit is contained in:
Adeeb Shihadeh
2025-08-26 12:37:36 -07:00
committed by GitHub
parent 3dc2138623
commit 1ce986f75c
68 changed files with 23 additions and 25137 deletions

View File

@@ -97,15 +97,13 @@ class PandaDFU:
return []
@staticmethod
def st_serial_to_dfu_serial(st: str, mcu_type: McuType = McuType.F4):
def st_serial_to_dfu_serial(st: str, mcu_type: McuType = McuType.H7):
if st is None or st == "none":
return None
try:
uid_base = struct.unpack("H" * 6, bytes.fromhex(st))
if mcu_type == McuType.H7:
return binascii.hexlify(struct.pack("!HHH", uid_base[1] + uid_base[5], uid_base[0] + uid_base[4], uid_base[3])).upper().decode("utf-8")
else:
return binascii.hexlify(struct.pack("!HHH", uid_base[1] + uid_base[5], uid_base[0] + uid_base[4] + 0xA, uid_base[3])).upper().decode("utf-8")
except struct.error:
return None