Skip to content

Commit

Permalink
Fix for cars without comma pedal
Browse files Browse the repository at this point in the history
  • Loading branch information
arne182 authored Mar 16, 2019
1 parent ee35939 commit 03103f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion selfdrive/controls/controlsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,11 @@ def state_control(plan, path_plan, CS, CP, state, events, v_cruise_kph, v_cruise
angle_offset = learn_angle_offset(active, CS.vEgo, angle_offset,
path_plan.cPoly, path_plan.cProb, CS.steeringAngle,
CS.steeringPressed)
if CP.enableGasInterceptor:
try:
gasinterceptor = CP.enableGasInterceptor
except AttributeError:
gasinterceptor = False
if gasinterceptor:
if CS.gasbuttonstatus == 0:
CP.gasMaxV = [0.2, 0.5, 0.7]
elif CS.gasbuttonstatus == 1:
Expand Down

0 comments on commit 03103f2

Please sign in to comment.