|
|
|
@ -18,15 +18,16 @@ class CarState(CarStateBase): |
|
|
|
|
self.shifter_values = can_define.dv["Gear_Shift_by_Wire_FD1"]["TrnRng_D_RqGsm"] |
|
|
|
|
|
|
|
|
|
self.vehicle_sensors_valid = False |
|
|
|
|
self.hybrid_platform = False |
|
|
|
|
self.unsupported_platform = False |
|
|
|
|
|
|
|
|
|
def update(self, cp, cp_cam): |
|
|
|
|
ret = car.CarState.new_message() |
|
|
|
|
|
|
|
|
|
# Hybrid variants experience a bug where a message from the PCM sends invalid checksums, |
|
|
|
|
# we do not support these cars at this time. |
|
|
|
|
# Ford Q3 hybrid variants experience a bug where a message from the PCM sends invalid checksums, |
|
|
|
|
# this must be root-caused before enabling support. Ford Q4 hybrids do not have this problem. |
|
|
|
|
# TrnAin_Tq_Actl and its quality flag are only set on ICE platform variants |
|
|
|
|
self.hybrid_platform = cp.vl["VehicleOperatingModes"]["TrnAinTq_D_Qf"] == 0 |
|
|
|
|
self.unsupported_platform = (cp.vl["VehicleOperatingModes"]["TrnAinTq_D_Qf"] == 0 and |
|
|
|
|
self.CP.carFingerprint not in CANFD_CAR) |
|
|
|
|
|
|
|
|
|
# Occasionally on startup, the ABS module recalibrates the steering pinion offset, so we need to block engagement |
|
|
|
|
# The vehicle usually recovers out of this state within a minute of normal driving |
|
|
|
|