mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 22:23:56 +08:00
controlsd: add blinkers to carControl (#26773)
* controlsd: add blinkers to carControl * not actuators * update refs
This commit is contained in:
2
cereal
2
cereal
Submodule cereal updated: 439429cad4...22b1431132
@@ -125,7 +125,7 @@ class CarController:
|
||||
|
||||
# blinkers
|
||||
if hda2 and self.CP.flags & HyundaiFlags.ENABLE_BLINKERS:
|
||||
can_sends.extend(hyundaicanfd.create_spas_messages(self.packer, self.frame, False, False))
|
||||
can_sends.extend(hyundaicanfd.create_spas_messages(self.packer, self.frame, CC.leftBlinker, CC.rightBlinker))
|
||||
|
||||
if self.CP.openpilotLongitudinalControl:
|
||||
if hda2:
|
||||
|
||||
@@ -577,6 +577,11 @@ class Controls:
|
||||
actuators = CC.actuators
|
||||
actuators.longControlState = self.LoC.long_control_state
|
||||
|
||||
# Enable blinkers while lane changing
|
||||
if self.sm['lateralPlan'].laneChangeState != LaneChangeState.off:
|
||||
CC.leftBlinker = self.sm['lateralPlan'].laneChangeDirection == LaneChangeDirection.left
|
||||
CC.rightBlinker = self.sm['lateralPlan'].laneChangeDirection == LaneChangeDirection.right
|
||||
|
||||
if CS.leftBlinker or CS.rightBlinker:
|
||||
self.last_blinker_frame = self.sm.frame
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
6681ca22053b019a65930e76a396535d0cddf39c
|
||||
99e9481d03e18a4dcd1eeebbfb24aca1ceb7e1e1
|
||||
Reference in New Issue
Block a user