controlsd: add blinkers to carControl (#26773)

* controlsd: add blinkers to carControl

* not actuators

* update refs
This commit is contained in:
Adeeb Shihadeh
2022-12-12 14:03:09 -08:00
committed by GitHub
parent f959952972
commit 151e0d8c39
4 changed files with 8 additions and 3 deletions

2
cereal

Submodule cereal updated: 439429cad4...22b1431132

View File

@@ -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:

View File

@@ -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

View File

@@ -1 +1 @@
6681ca22053b019a65930e76a396535d0cddf39c
99e9481d03e18a4dcd1eeebbfb24aca1ceb7e1e1