From e2b3b65db5c9a3934d7cef1504d70abe76b387ce Mon Sep 17 00:00:00 2001 From: John Jones Date: Sun, 11 Jun 2017 13:20:19 -0400 Subject: [PATCH] adding steering change from video and removing integer div and adding ki/kp changes old-commit-hash: 942655c9479e20f414b853a96a96f8ba529eb03c --- common/fingerprints.py | 2 +- selfdrive/car/honda/carcontroller.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/fingerprints.py b/common/fingerprints.py index 18cde9009..051ed7a70 100644 --- a/common/fingerprints.py +++ b/common/fingerprints.py @@ -127,7 +127,7 @@ def fingerprint(logcan): elif candidate_cars[0] == "HONDA ACCORD 2016 TOURING": ret.steerKp, ret.steerKi = 12.0, 1.0 elif candidate_cars[0] == "HONDA CR-V 2016 TOURING": - ret.steerKp, ret.steerKi = 12.0, 1.0 + ret.steerKp, ret.steerKi = 14.0, 1.67 else: raise ValueError("unsupported car %s" % candidate_cars[0]) diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py index d0ea41c53..a87af94f7 100644 --- a/selfdrive/car/honda/carcontroller.py +++ b/selfdrive/car/honda/carcontroller.py @@ -141,7 +141,7 @@ class CarController(object): GAS_MAX = 1004 BRAKE_MAX = 1024/4 if CS.crv: - STEER_MAX = 0xFFF/2 + STEER_MAX = 0x380 # CR-V only uses 12-bits and requires a lower value else: STEER_MAX = 0xF00 GAS_OFFSET = 328