Skip to content

Commit

Permalink
Match panda acc pedal safety
Browse files Browse the repository at this point in the history
  • Loading branch information
dzid26 committed Sep 22, 2024
1 parent 39a43ad commit 06ec786
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion panda
1 change: 1 addition & 0 deletions selfdrive/car/bmw/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def update(self, cp_PT, cp_F, cp_aux):
ret.brakePressed = cp_PT.vl["EngineAndBrake"]['BrakePressed'] != 0
ret.parkingBrake = cp_PT.vl["Status_contact_handbrake"]["Handbrake_pulled_up"] != 0
ret.gas = cp_PT.vl['AccPedal']["AcceleratorPedalPercentage"]
# on some cars, when cruise is engaged, half pressed pedal becomes "KickDownPressed", even without pressing kickdown end stop
ret.gasPressed = cp_PT.vl['AccPedal']["AcceleratorPedalPressed"] != 0 or cp_PT.vl['AccPedal']["KickDownPressed"] != 0
self.gas_kickdown = cp_PT.vl['AccPedal']["KickDownPressed"] != 0 #BMW has kickdown button at the bottom of the pedal

Expand Down

0 comments on commit 06ec786

Please sign in to comment.