mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-25 11:52:20 +08:00
Update selfdrive/controls/lib/desire_helper.py
Co-authored-by: Jason Wen <haibin.wen3@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b63d0a1d18
commit
71e1149ee3
@@ -109,14 +109,14 @@ class DesireHelper:
|
||||
|
||||
self.prev_one_blinker = one_blinker
|
||||
|
||||
self.desire = DESIRES[self.lane_change_direction][self.lane_change_state]
|
||||
|
||||
# Lane turn controller update
|
||||
turn_desire = self.lane_turn_controller.update(carstate.leftBlindspot, carstate.rightBlindspot, carstate.leftBlinker, carstate.rightBlinker,
|
||||
carstate.vEgo, carstate.steeringPressed, carstate.steeringTorque)
|
||||
self.lane_turn_direction = self.lane_turn_controller.get_lane_turn_direction()
|
||||
if turn_desire != log.Desire.none:
|
||||
self.desire = turn_desire
|
||||
else:
|
||||
self.desire = DESIRES[self.lane_change_direction][self.lane_change_state]
|
||||
|
||||
# Send keep pulse once per second during LaneChangeStart.preLaneChange
|
||||
if self.lane_change_state in (LaneChangeState.off, LaneChangeState.laneChangeStarting):
|
||||
|
||||
Reference in New Issue
Block a user