|
|
|
@ -45,11 +45,13 @@ 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: |
|
|
|
|
ret.flags |= FordFlags.LKAS_UNAVAILABLE |
|
|
|
|
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 != 0xFF or config_lca != 0xFF: |
|
|
|
|
ret.flags |= FordFlags.LKAS_UNAVAILABLE |
|
|
|
|
ret.dashcamOnly = True |
|
|
|
|
|
|
|
|
|
# Auto Transmission: 0x732 ECU or Gear_Shift_by_Wire_FD1 |
|
|
|
@ -79,6 +81,8 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
events = self.create_common_events(ret, extra_gears=[GearShifter.manumatic]) |
|
|
|
|
if not self.CS.vehicle_sensors_valid: |
|
|
|
|
events.add(car.CarEvent.EventName.vehicleSensorsInvalid) |
|
|
|
|
elif self.CP.flags & FordFlags.LKAS_UNAVAILABLE: |
|
|
|
|
events.add(car.CarEvent.EventName.actuatorsApiUnavailable) |
|
|
|
|
|
|
|
|
|
ret.events = events.to_msg() |
|
|
|
|
|
|
|
|
|