getting error from last change, revert a couple back.

This commit is contained in:
Rick Lan
2019-02-17 10:46:07 +10:00
parent 0f47ccc1ba
commit 17fbe1a4dd
+15 -15
View File
@@ -39,12 +39,12 @@ def get_can_parser(CP):
("CRUISE_STATE", "PCM_CRUISE", 0),
("MAIN_ON", "PCM_CRUISE_2", 0),
("SET_SPEED", "PCM_CRUISE_2", 0),
("LOW_SPEED_LOCKOUT", "PCM_CRUISE_2", 0),
# ("LOW_SPEED_LOCKOUT", "PCM_CRUISE_2", 0),
("STEER_TORQUE_DRIVER", "STEER_TORQUE_SENSOR", 0),
("STEER_TORQUE_EPS", "STEER_TORQUE_SENSOR", 0),
("TURN_SIGNALS", "STEERING_LEVERS", 3), # 3 is no blinkers
("LKA_STATE", "EPS_STATUS", 0),
("IPAS_STATE", "EPS_STATUS", 1),
# ("IPAS_STATE", "EPS_STATUS", 1),
("BRAKE_LIGHTS_ACC", "ESP_CONTROL", 0),
("AUTO_HIGH_BEAM", "LIGHT_STALK", 0),
]
@@ -60,7 +60,7 @@ def get_can_parser(CP):
("EPS_STATUS", 25),
]
# if not CP.carFingerprint == CAR.LEXUS_ISH:
if not CP.carFingerprint == CAR.LEXUS_ISH:
# checks = [
# ("BRAKE_MODULE", 50),
# ("GAS_PEDAL", 50),
@@ -72,10 +72,10 @@ def get_can_parser(CP):
# ("EPS_STATUS", 25),
# ]
# else:
# signals += [
# ("LOW_SPEED_LOCKOUT", "PCM_CRUISE_2", 0),
# ("IPAS_STATE", "EPS_STATUS", 1),
# ]
signals += [
("LOW_SPEED_LOCKOUT", "PCM_CRUISE_2", 0),
("IPAS_STATE", "EPS_STATUS", 1),
]
if CP.carFingerprint == CAR.PRIUS:
signals += [("STATE", "AUTOPARK_STATUS", 0)]
@@ -161,10 +161,10 @@ class CarState(object):
# 2 is standby, 10 is active. TODO: check that everything else is really a faulty state
self.steer_state = cp.vl["EPS_STATUS"]['LKA_STATE']
self.steer_error = cp.vl["EPS_STATUS"]['LKA_STATE'] not in [1, 5]
# if self.CP.carFingerprint == CAR.LEXUS_ISH:
# self.ipas_active = False
# else:
self.ipas_active = cp.vl['EPS_STATUS']['IPAS_STATE'] == 3
if self.CP.carFingerprint == CAR.LEXUS_ISH:
self.ipas_active = False
else:
self.ipas_active = cp.vl['EPS_STATUS']['IPAS_STATE'] == 3
self.brake_error = 0
self.steer_torque_driver = cp.vl["STEER_TORQUE_SENSOR"]['STEER_TORQUE_DRIVER']
self.steer_torque_motor = cp.vl["STEER_TORQUE_SENSOR"]['STEER_TORQUE_EPS']
@@ -176,10 +176,10 @@ class CarState(object):
self.pcm_acc_status = cp.vl["PCM_CRUISE"]['CRUISE_STATE']
self.pcm_acc_active = bool(cp.vl["PCM_CRUISE"]['CRUISE_ACTIVE'])
self.gas_pressed = not cp.vl["PCM_CRUISE"]['GAS_RELEASED']
# if self.CP.carFingerprint == CAR.LEXUS_ISH:
# self.low_speed_lockout = False
# else:
self.low_speed_lockout = cp.vl["PCM_CRUISE_2"]['LOW_SPEED_LOCKOUT'] == 2
if self.CP.carFingerprint == CAR.LEXUS_ISH:
self.low_speed_lockout = False
else:
self.low_speed_lockout = cp.vl["PCM_CRUISE_2"]['LOW_SPEED_LOCKOUT'] == 2
self.brake_lights = bool(cp.vl["ESP_CONTROL"]['BRAKE_LIGHTS_ACC'] or self.brake_pressed)
if self.CP.carFingerprint == CAR.PRIUS:
self.generic_toggle = cp.vl["AUTOPARK_STATUS"]['STATE'] != 0