Skip to content

Commit

Permalink
Pedal isn't working, disabled for now
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane authored Aug 3, 2021
1 parent abc3983 commit 346838e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions selfdrive/car/toyota/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, hud_alert,
# *** compute control surfaces ***

# gas and brake
interceptor_gas_cmd = 0.
interceptor_gas_cmd = clip(actuators.gas, 0, 1)
pcm_accel_cmd = actuators.gas - actuators.brake

if CS.CP.enableGasInterceptor:
Expand All @@ -74,7 +74,7 @@ def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, hud_alert,
if self.use_interceptor and enabled:
# only send negative accel when using interceptor. gas handles acceleration
# +0.06 offset to reduce ABS pump usage when OP is engaged
interceptor_gas_cmd = clip(compute_gb_pedal(pcm_accel_cmd * CarControllerParams.ACCEL_SCALE, CS.out.vEgo), 0., 1.)
# interceptor_gas_cmd = clip(compute_gb_pedal(pcm_accel_cmd * CarControllerParams.ACCEL_SCALE, CS.out.vEgo), 0., 1.)
pcm_accel_cmd = 0.06 - actuators.brake

pcm_accel_cmd, self.accel_steady = accel_hysteresis(pcm_accel_cmd, self.accel_steady, enabled)
Expand Down

0 comments on commit 346838e

Please sign in to comment.