Skip to content

Commit

Permalink
Merge branch 'kegman-devel' of https://github.com/kegman/openpilot in…
Browse files Browse the repository at this point in the history
…to kegman-devel
  • Loading branch information
NeonGalaxy75 committed Dec 20, 2018
2 parents 6531ed2 + 88a3d43 commit 612695b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion selfdrive/car/honda/carstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,6 @@ def update(self, cp, cp_cam):

self.steer_torque_driver = cp.vl["STEER_STATUS"]['STEER_TORQUE_SENSOR']
self.steer_override = abs(self.steer_torque_driver) > STEER_THRESHOLD[self.CP.carFingerprint]

self.brake_switch = cp.vl["POWERTRAIN_DATA"]['BRAKE_SWITCH']

if self.CP.radarOffCan:
Expand All @@ -305,13 +304,20 @@ def update(self, cp, cp_cam):
self.brake_pressed = cp.vl["POWERTRAIN_DATA"]['BRAKE_PRESSED'] or \
(self.brake_switch and self.brake_switch_prev and \
cp.ts["POWERTRAIN_DATA"]['BRAKE_SWITCH'] != self.brake_switch_ts)

self.brake_switch_prev = self.brake_switch
self.brake_switch_ts = cp.ts["POWERTRAIN_DATA"]['BRAKE_SWITCH']

self.user_brake = cp.vl["VSA_STATUS"]['USER_BRAKE']
self.pcm_acc_status = cp.vl["POWERTRAIN_DATA"]['ACC_STATUS']
self.hud_lead = cp.vl["ACC_HUD"]['HUD_LEAD']

# gets rid of Pedal Grinding noise
if self.user_brake > 0.05 or self.brake_pressed:
self.brake_pressed = 1
else:
self.brake_pressed = 0

# when user presses distance button on steering wheel
if self.cruise_setting == 3:
if cp.vl["SCM_BUTTONS"]["CRUISE_SETTING"] == 0:
Expand Down
2 changes: 1 addition & 1 deletion selfdrive/controls/lib/longcontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

STOPPING_BRAKE_RATE = 0.2 # brake_travel/s while trying to stop
STARTING_BRAKE_RATE = 0.8 # brake_travel/s while releasing on restart
BRAKE_STOPPING_TARGET = 0.1 # apply at least this amount of brake to maintain the vehicle stationary
BRAKE_STOPPING_TARGET = 0.25 # apply at least this amount of brake to maintain the vehicle stationary

_MAX_SPEED_ERROR_BP = [0., 30.] # speed breakpoints
_MAX_SPEED_ERROR_V = [1.5, .8] # max positive v_pid error VS actual speed; this avoids controls windup due to slow pedal resp
Expand Down

0 comments on commit 612695b

Please sign in to comment.