mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-08-24 01:33:50 +08:00
No actuation while in pre-enabled state (#23658)
* No actuation while in pre-enabled state * update refs
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user