|
|
@ -70,6 +70,7 @@ class CarState(CarStateBase): |
|
|
|
ret.brake = 0 |
|
|
|
ret.brake = 0 |
|
|
|
ret.brakePressed = cp.vl["TCS13"]["DriverBraking"] != 0 |
|
|
|
ret.brakePressed = cp.vl["TCS13"]["DriverBraking"] != 0 |
|
|
|
ret.brakeHoldActive = cp.vl["TCS15"]["AVH_LAMP"] == 2 # 0 OFF, 1 ERROR, 2 ACTIVE, 3 READY |
|
|
|
ret.brakeHoldActive = cp.vl["TCS15"]["AVH_LAMP"] == 2 # 0 OFF, 1 ERROR, 2 ACTIVE, 3 READY |
|
|
|
|
|
|
|
ret.parkingBrake = cp.vl["TCS13"]["PBRAKE_ACT"] == 1 |
|
|
|
|
|
|
|
|
|
|
|
if self.CP.carFingerprint in (HYBRID_CAR | EV_CAR): |
|
|
|
if self.CP.carFingerprint in (HYBRID_CAR | EV_CAR): |
|
|
|
if self.CP.carFingerprint in HYBRID_CAR: |
|
|
|
if self.CP.carFingerprint in HYBRID_CAR: |
|
|
@ -109,7 +110,6 @@ class CarState(CarStateBase): |
|
|
|
# save the entire LKAS11 and CLU11 |
|
|
|
# save the entire LKAS11 and CLU11 |
|
|
|
self.lkas11 = copy.copy(cp_cam.vl["LKAS11"]) |
|
|
|
self.lkas11 = copy.copy(cp_cam.vl["LKAS11"]) |
|
|
|
self.clu11 = copy.copy(cp.vl["CLU11"]) |
|
|
|
self.clu11 = copy.copy(cp.vl["CLU11"]) |
|
|
|
self.park_brake = cp.vl["TCS13"]["PBRAKE_ACT"] == 1 |
|
|
|
|
|
|
|
self.steer_state = cp.vl["MDPS12"]["CF_Mdps_ToiActive"] # 0 NOT ACTIVE, 1 ACTIVE |
|
|
|
self.steer_state = cp.vl["MDPS12"]["CF_Mdps_ToiActive"] # 0 NOT ACTIVE, 1 ACTIVE |
|
|
|
self.brake_error = cp.vl["TCS13"]["ACCEnable"] != 0 # 0 ACC CONTROL ENABLED, 1-3 ACC CONTROL DISABLED |
|
|
|
self.brake_error = cp.vl["TCS13"]["ACCEnable"] != 0 # 0 ACC CONTROL ENABLED, 1-3 ACC CONTROL DISABLED |
|
|
|
self.prev_cruise_buttons = self.cruise_buttons |
|
|
|
self.prev_cruise_buttons = self.cruise_buttons |
|
|
|