remove pedal fw (#1872)

* remove pedal fw

* little more

* one more

* and tests

* rest of it

* little more

* fix linter

* more fix
This commit is contained in:
Adeeb Shihadeh
2024-02-16 22:58:01 -08:00
committed by GitHub
parent 39671c3dd6
commit c076a9f2f6
32 changed files with 114 additions and 936 deletions

View File

@@ -175,7 +175,6 @@ class Panda:
HEALTH_STRUCT = struct.Struct("<IIIIIIIIIBBBBBHBBBHfBBHBHHB")
CAN_HEALTH_STRUCT = struct.Struct("<BIBBBBBBBBIIIIIIIHHBBBIIII")
F2_DEVICES = [HW_TYPE_PEDAL, ]
F4_DEVICES = [HW_TYPE_WHITE_PANDA, HW_TYPE_GREY_PANDA, HW_TYPE_BLACK_PANDA, HW_TYPE_UNO, HW_TYPE_DOS]
H7_DEVICES = [HW_TYPE_RED_PANDA, HW_TYPE_RED_PANDA_V2, HW_TYPE_TRES, HW_TYPE_CUATRO]
@@ -410,7 +409,7 @@ class Panda:
if device.getVendorID() == 0xbbaa and device.getProductID() in cls.USB_PIDS:
try:
serial = device.getSerialNumber()
if len(serial) == 24 or serial == "pedal":
if len(serial) == 24:
ret.append(serial)
else:
logging.warning(f"found device with panda descriptors but invalid serial: {serial}", RuntimeWarning)
@@ -698,9 +697,7 @@ class Panda:
def get_mcu_type(self) -> McuType:
hw_type = self.get_type()
if hw_type in Panda.F2_DEVICES:
return McuType.F2
elif hw_type in Panda.F4_DEVICES:
if hw_type in Panda.F4_DEVICES:
return McuType.F4
elif hw_type in Panda.H7_DEVICES:
return McuType.H7