mirror of https://github.com/commaai/openpilot.git
controlsd: add blinkers to carControl (#26773)
* controlsd: add blinkers to carControl
* not actuators
* update refs
old-commit-hash: 151e0d8c39
This commit is contained in:
parent
0fd3e3d19d
commit
69f6d32678
2
cereal
2
cereal
|
@ -1 +1 @@
|
|||
Subproject commit 439429cad4d1e2ab874520cb5d4db8b8d978cbde
|
||||
Subproject commit 22b1431132b038253a24ab3fbbe3af36ef93b95b
|
|
@ -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
|
Loading…
Reference in New Issue