mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-27 00:42:05 +08:00
@@ -154,21 +154,6 @@ class CarController:
|
||||
if self.frame % 10 == 0:
|
||||
can_sends.append(gmcan.create_pscm_status(self.packer_pt, CanBus.CAMERA, CS.pscm_status))
|
||||
|
||||
# Show green icon when LKA torque is applied, and
|
||||
# alarming orange icon when approaching torque limit.
|
||||
# If not sent again, LKA icon disappears in about 5 seconds.
|
||||
# Conveniently, sending camera message periodically also works as a keepalive.
|
||||
lka_active = CS.lkas_status == 1
|
||||
lka_critical = lka_active and abs(actuators.steer) > 0.9
|
||||
lka_icon_status = (lka_active, lka_critical)
|
||||
|
||||
# SW_GMLAN not yet on cam harness, no HUD alerts
|
||||
if self.CP.networkLocation != NetworkLocation.fwdCamera and \
|
||||
(self.frame % self.params.CAMERA_KEEPALIVE_STEP == 0 or lka_icon_status != self.lka_icon_status_last):
|
||||
steer_alert = hud_alert in (VisualAlert.steerRequired, VisualAlert.ldw)
|
||||
can_sends.append(gmcan.create_lka_icon_command(CanBus.SW_GMLAN, lka_active, lka_critical, steer_alert))
|
||||
self.lka_icon_status_last = lka_icon_status
|
||||
|
||||
new_actuators = actuators.copy()
|
||||
new_actuators.steer = self.apply_steer_last / self.params.STEER_MAX
|
||||
new_actuators.steerOutputCan = self.apply_steer_last
|
||||
|
||||
@@ -139,7 +139,6 @@ class CanBus:
|
||||
OBSTACLE = 1
|
||||
CAMERA = 2
|
||||
CHASSIS = 2
|
||||
SW_GMLAN = 3
|
||||
LOOPBACK = 128
|
||||
DROPPED = 192
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
94d2c0b18c2829b487fd23f079b08e9e3c75f4b4
|
||||
80c700f9b87e069dcb5b7ec76cd6036667615f2e
|
||||
Reference in New Issue
Block a user