From 9c343bb37b438a10f527333a71d18df47052c61c Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 6 May 2024 19:20:01 -0700 Subject: [PATCH] clean up --- selfdrive/car/ford/interface.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/selfdrive/car/ford/interface.py b/selfdrive/car/ford/interface.py index 32bd8604af..b8367a78a1 100644 --- a/selfdrive/car/ford/interface.py +++ b/selfdrive/car/ford/interface.py @@ -43,16 +43,11 @@ class CarInterface(CarInterfaceBase): pscm_config = next((fw for fw in car_fw if fw.ecu == Ecu.eps and b'\x22\xDE\x01' in fw.request), None) if pscm_config: if len(pscm_config.response) != 24: - # Unexpected length ret.dashcamOnly = True else: - config_tja = pscm_config.response[7] # Traffic Jam Assist - config_lca = pscm_config.response[8] # Lane Centering Assist - if config_tja not in (0x00, 0xFF) or config_lca not in (0x00, 0xFF): - # Unexpected value - ret.dashcamOnly = True - elif config_tja == 0x00 or config_lca == 0x00: - # TJA or LCA not enabled + config_tja = pscm_config.response[7] # Traffic Jam Assist (long) + config_lca = pscm_config.response[8] # Lane Centering Assist (lat) + if config_tja != 0xFF or config_lca != 0xFF: ret.dashcamOnly = True # Auto Transmission: 0x732 ECU or Gear_Shift_by_Wire_FD1