mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-08 11:54:36 +08:00
[bugfix] sdsu dist btn
This commit is contained in:
@@ -217,14 +217,6 @@ class CarState(CarStateBase):
|
|||||||
buttonEvents.extend(create_button_events(1, 0, {1: ButtonType.lkas}) +
|
buttonEvents.extend(create_button_events(1, 0, {1: ButtonType.lkas}) +
|
||||||
create_button_events(0, 1, {1: ButtonType.lkas}))
|
create_button_events(0, 1, {1: ButtonType.lkas}))
|
||||||
|
|
||||||
if self.sdsu.enabled:
|
|
||||||
# The follow distance button signal as forwarded by the sdsu
|
|
||||||
self.sdsu.update_states(can_parsers[Bus.sdsu])
|
|
||||||
prev_distance_button = self.distance_button
|
|
||||||
self.distance_button = self.sdsu.dist_btn
|
|
||||||
|
|
||||||
buttonEvents += create_button_events(self.distance_button, prev_distance_button, {1: ButtonType.gapAdjustCruise})
|
|
||||||
|
|
||||||
elif self.CP.carFingerprint not in (RADAR_ACC_CAR | SECOC_CAR):
|
elif self.CP.carFingerprint not in (RADAR_ACC_CAR | SECOC_CAR):
|
||||||
# distance button is wired to the ACC module (camera or radar)
|
# distance button is wired to the ACC module (camera or radar)
|
||||||
prev_distance_button = self.distance_button
|
prev_distance_button = self.distance_button
|
||||||
@@ -232,6 +224,14 @@ class CarState(CarStateBase):
|
|||||||
|
|
||||||
buttonEvents += create_button_events(self.distance_button, prev_distance_button, {1: ButtonType.gapAdjustCruise})
|
buttonEvents += create_button_events(self.distance_button, prev_distance_button, {1: ButtonType.gapAdjustCruise})
|
||||||
|
|
||||||
|
elif self.sdsu.enabled:
|
||||||
|
# The follow distance button signal as forwarded by the sdsu
|
||||||
|
self.sdsu.update_states(can_parsers[Bus.sdsu])
|
||||||
|
prev_distance_button = self.distance_button
|
||||||
|
self.distance_button = self.sdsu.dist_btn
|
||||||
|
|
||||||
|
buttonEvents += create_button_events(self.distance_button, prev_distance_button, {1: ButtonType.gapAdjustCruise})
|
||||||
|
|
||||||
ret.buttonEvents = buttonEvents
|
ret.buttonEvents = buttonEvents
|
||||||
|
|
||||||
# dp - ALKA: Toyota requires main ON to use ACC/LKA, use main as switch
|
# dp - ALKA: Toyota requires main ON to use ACC/LKA, use main as switch
|
||||||
|
|||||||
Reference in New Issue
Block a user