No actuation while in pre-enabled state (#23658)

* No actuation while in pre-enabled state

* update refs
This commit is contained in:
Adeeb Shihadeh
2022-01-28 16:03:44 -08:00
committed by GitHub
parent 8eb6a6a535
commit 72e00a0768
13 changed files with 22 additions and 24 deletions
+2 -2
View File
@@ -12,12 +12,12 @@ class CarController():
self.pt_packer = CANPacker(DBC[CP.carFingerprint]['pt'])
self.tesla_can = TeslaCAN(self.packer, self.pt_packer)
def update(self, enabled, CS, frame, actuators, cruise_cancel):
def update(self, c, enabled, CS, frame, actuators, cruise_cancel):
can_sends = []
# Temp disable steering on a hands_on_fault, and allow for user override
hands_on_fault = (CS.steer_warning == "EAC_ERROR_HANDS_ON" and CS.hands_on_level >= 3)
lkas_enabled = enabled and (not hands_on_fault)
lkas_enabled = c.active and (not hands_on_fault)
if lkas_enabled:
apply_angle = actuators.steeringAngleDeg