mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-22 22:42:05 +08:00
Subaru continuous blinker signals for assisted lane change (#1000)
This commit is contained in:
@@ -89,8 +89,10 @@ class CarState():
|
||||
|
||||
self.car_fingerprint = CP.carFingerprint
|
||||
self.left_blinker_on = False
|
||||
self.left_blinker_cnt = 0
|
||||
self.prev_left_blinker_on = False
|
||||
self.right_blinker_on = False
|
||||
self.right_blinker_cnt = 0
|
||||
self.prev_right_blinker_on = False
|
||||
self.steer_torque_driver = 0
|
||||
self.steer_not_allowed = False
|
||||
@@ -136,8 +138,14 @@ class CarState():
|
||||
|
||||
self.prev_left_blinker_on = self.left_blinker_on
|
||||
self.prev_right_blinker_on = self.right_blinker_on
|
||||
self.left_blinker_on = cp.vl["Dashlights"]['LEFT_BLINKER'] == 1
|
||||
self.right_blinker_on = cp.vl["Dashlights"]['RIGHT_BLINKER'] == 1
|
||||
|
||||
# continuous blinker signals for assisted lane change
|
||||
self.left_blinker_cnt = 50 if cp.vl["Dashlights"]['LEFT_BLINKER'] else max(self.left_blinker_cnt - 1, 0)
|
||||
self.left_blinker_on = self.left_blinker_cnt > 0
|
||||
|
||||
self.right_blinker_cnt = 50 if cp.vl["Dashlights"]['RIGHT_BLINKER'] else max(self.right_blinker_cnt - 1, 0)
|
||||
self.right_blinker_on = self.right_blinker_cnt > 0
|
||||
|
||||
self.seatbelt_unlatched = cp.vl["Dashlights"]['SEATBELT_FL'] == 1
|
||||
self.steer_torque_driver = cp.vl["Steering_Torque"]['Steer_Torque_Sensor']
|
||||
self.acc_active = cp.vl["CruiseControl"]['Cruise_Activated']
|
||||
|
||||
@@ -1 +1 @@
|
||||
21af1bad2b4a8dc95cf9bb697f9db595aabdc5bd
|
||||
fe9ccb27b12c9d3788bed8a402293985f5eb0448
|
||||
Reference in New Issue
Block a user