Skip to content

Commit

Permalink
Merge fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Gernby committed Feb 5, 2019
1 parent 6d737ca commit 167ef82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Binary file added models/driving_model.dlc
Binary file not shown.
7 changes: 2 additions & 5 deletions selfdrive/car/honda/carcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,16 @@ def update(self, sendcan, enabled, CS, frame, actuators, \
BRAKE_MAX = 1024/4
if CS.CP.carFingerprint in (CAR.ACURA_ILX):
STEER_MAX = 0xF00
STEER_SCALE = STEER_MAX
elif CS.CP.carFingerprint in (CAR.CRV, CAR.ACURA_RDX):
STEER_MAX = 0x3e8 # CR-V only uses 12-bits and requires a lower value (max value from energee)
STEER_SCALE = STEER_MAX
else:
# Fix max value without throwing off the tune
STEER_MAX = 0xF00
STEER_SCALE = 0x1000
STEER_MAX = 0x1000

# steer torque is converted back to CAN reference (positive when steering right)
apply_gas = clip(actuators.gas, 0., 1.)
apply_brake = int(clip(self.brake_last * BRAKE_MAX, 0, BRAKE_MAX - 1))
apply_steer = int(clip(-actuators.steer * STEER_SCALE, -STEER_MAX, STEER_MAX))
apply_steer = int(clip(-actuators.steer * STEER_MAX, -STEER_MAX, STEER_MAX))

lkas_active = enabled and not CS.steer_not_allowed

Expand Down

0 comments on commit 167ef82

Please sign in to comment.