mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-04 04:52:09 +08:00
Chrysler non-ACC Fix - Only allow openpilot in ACC mode (#19581)
* initial try, needs to be tested * Chrysler: Add to CAN parser * Chrysler: move cruise state by other dash message * fix messed up force push * whitespace Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: 937aa829a3a4871e46bddfb42e67c37d38884da6
This commit is contained in:
@@ -49,6 +49,8 @@ class CarState(CarStateBase):
|
||||
ret.cruiseState.enabled = cp.vl["ACC_2"]['ACC_STATUS_2'] == 7 # ACC is green.
|
||||
ret.cruiseState.available = ret.cruiseState.enabled # FIXME: for now same as enabled
|
||||
ret.cruiseState.speed = cp.vl["DASHBOARD"]['ACC_SPEED_CONFIG_KPH'] * CV.KPH_TO_MS
|
||||
# CRUISE_STATE is a three bit msg, 0 is off, 1 and 2 are Non-ACC mode, 3 and 4 are ACC mode, find if there are other states too
|
||||
ret.cruiseState.nonAdaptive = cp.vl["DASHBOARD"]['CRUISE_STATE'] in [1, 2]
|
||||
|
||||
ret.steeringTorque = cp.vl["EPS_STATUS"]["TORQUE_DRIVER"]
|
||||
ret.steeringTorqueEps = cp.vl["EPS_STATUS"]["TORQUE_MOTOR"]
|
||||
@@ -87,6 +89,7 @@ class CarState(CarStateBase):
|
||||
("ACC_STATUS_2", "ACC_2", 0),
|
||||
("HIGH_BEAM_FLASH", "STEERING_LEVERS", 0),
|
||||
("ACC_SPEED_CONFIG_KPH", "DASHBOARD", 0),
|
||||
("CRUISE_STATE", "DASHBOARD", 0),
|
||||
("TORQUE_DRIVER", "EPS_STATUS", 0),
|
||||
("TORQUE_MOTOR", "EPS_STATUS", 0),
|
||||
("LKAS_STATE", "EPS_STATUS", 1),
|
||||
|
||||
Reference in New Issue
Block a user