Ford: consolidate comments about unsupported hybrid platforms (#30709)
* fix typo, move comments to one place * -appear * Update selfdrive/car/ford/carstate.py old-commit-hash: 77066a226068ea933b565b9521c26a99c72e7a6a
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -100,9 +100,7 @@ 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)
|
||||
|
||||
# Ford Q3 Hybrids are disabled due to occasional incorrect checksums some stock messages. This must be root caused before enabling support.
|
||||
if self.CS.hybrid_platform and self.CP.carFingerprint not in CANFD_CAR:
|
||||
if self.CS.unsupported_platform:
|
||||
events.add(car.CarEvent.EventName.startupNoControl)
|
||||
|
||||
ret.events = events.to_msg()
|
||||
|
||||
Reference in New Issue
Block a user