diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py index c1ab1f0a9b..8c63393a31 100644 --- a/selfdrive/car/honda/carcontroller.py +++ b/selfdrive/car/honda/carcontroller.py @@ -107,7 +107,7 @@ class CarController(): self.params = CarControllerParams(CP) - def update(self, enabled, CS, frame, actuators, pcm_cancel_cmd, + def update(self, enabled, active, CS, frame, actuators, pcm_cancel_cmd, hud_v_cruise, hud_show_lanes, hud_show_car, hud_alert): P = self.params @@ -213,7 +213,7 @@ class CarController(): if CS.CP.carFingerprint in HONDA_BOSCH: accel = clip(accel, P.BOSCH_ACCEL_MIN, P.BOSCH_ACCEL_MAX) bosch_gas = interp(accel, P.BOSCH_GAS_LOOKUP_BP, P.BOSCH_GAS_LOOKUP_V) - can_sends.extend(hondacan.create_acc_commands(self.packer, enabled, accel, bosch_gas, idx, stopping, starting, CS.CP.carFingerprint)) + can_sends.extend(hondacan.create_acc_commands(self.packer, enabled, active, accel, bosch_gas, idx, stopping, starting, CS.CP.carFingerprint)) else: apply_brake = clip(self.brake_last - wind_brake, 0.0, 1.0) diff --git a/selfdrive/car/honda/hondacan.py b/selfdrive/car/honda/hondacan.py index 2fa8b9c8a7..305395693c 100644 --- a/selfdrive/car/honda/hondacan.py +++ b/selfdrive/car/honda/hondacan.py @@ -43,17 +43,17 @@ def create_brake_command(packer, apply_brake, pump_on, pcm_override, pcm_cancel_ return packer.make_can_msg("BRAKE_COMMAND", bus, values, idx) -def create_acc_commands(packer, enabled, accel, gas, idx, stopping, starting, car_fingerprint): +def create_acc_commands(packer, enabled, active, accel, gas, idx, stopping, starting, car_fingerprint): commands = [] bus = get_pt_bus(car_fingerprint) min_gas_accel = CarControllerParams.BOSCH_GAS_LOOKUP_BP[0] control_on = 5 if enabled else 0 - gas_command = gas if enabled and accel > min_gas_accel else -30000 - accel_command = accel if enabled else 0 - braking = 1 if enabled and accel < min_gas_accel else 0 - standstill = 1 if enabled and stopping else 0 - standstill_release = 1 if enabled and starting else 0 + gas_command = gas if active and accel > min_gas_accel else -30000 + accel_command = accel if active else 0 + braking = 1 if active and accel < min_gas_accel else 0 + standstill = 1 if active and stopping else 0 + standstill_release = 1 if active and starting else 0 acc_control_values = { # setting CONTROL_ON causes car to set POWERTRAIN_DATA->ACC_STATUS = 1 diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py index 8bb6f05883..2a33248c97 100755 --- a/selfdrive/car/honda/interface.py +++ b/selfdrive/car/honda/interface.py @@ -418,7 +418,7 @@ class CarInterface(CarInterfaceBase): else: hud_v_cruise = 255 - can_sends = self.CC.update(c.enabled, self.CS, self.frame, + can_sends = self.CC.update(c.enabled, c.active, self.CS, self.frame, c.actuators, c.cruiseControl.cancel, hud_v_cruise,