diff --git a/docs/CARS.md b/docs/CARS.md
index 3e23316bd8..7c8170c275 100644
--- a/docs/CARS.md
+++ b/docs/CARS.md
@@ -44,9 +44,9 @@ A supported vehicle is one that just works when you install a comma three. All s
|Honda|Accord Hybrid 2018-22|All|openpilot available[1](#footnotes)|0 mph|3 mph|[](##)|[](##)|Honda Bosch A||
|Honda|Civic 2016-18|Honda Sensing|openpilot|0 mph|12 mph|[](##)|[](##)|Honda Nidec|
|
|Honda|Civic 2019-21|All|openpilot available[1](#footnotes)|0 mph|2 mph[4](#footnotes)|[](##)|[](##)|Honda Bosch A|
|
-|Honda|Civic 2022|All|Stock|0 mph|0 mph|[](##)|[](##)|Honda Bosch B||
+|Honda|Civic 2022|All|openpilot available[1](#footnotes)|0 mph|0 mph|[](##)|[](##)|Honda Bosch B||
|Honda|Civic Hatchback 2017-21|Honda Sensing|openpilot available[1](#footnotes)|0 mph|12 mph|[](##)|[](##)|Honda Bosch A||
-|Honda|Civic Hatchback 2022|All|Stock|0 mph|0 mph|[](##)|[](##)|Honda Bosch B||
+|Honda|Civic Hatchback 2022|All|openpilot available[1](#footnotes)|0 mph|0 mph|[](##)|[](##)|Honda Bosch B||
|Honda|CR-V 2015-16|Touring Trim|openpilot|25 mph|12 mph|[](##)|[](##)|Honda Nidec||
|Honda|CR-V 2017-22|Honda Sensing|openpilot available[1](#footnotes)|0 mph|12 mph|[](##)|[](##)|Honda Bosch A||
|Honda|CR-V Hybrid 2017-19|Honda Sensing|openpilot available[1](#footnotes)|0 mph|12 mph|[](##)|[](##)|Honda Bosch A||
diff --git a/selfdrive/car/honda/carcontroller.py b/selfdrive/car/honda/carcontroller.py
index 4dc1dc8131..f6d328131b 100644
--- a/selfdrive/car/honda/carcontroller.py
+++ b/selfdrive/car/honda/carcontroller.py
@@ -1,7 +1,6 @@
from collections import namedtuple
from cereal import car
-from common.conversions import Conversions as CV
from common.numpy_fast import clip, interp
from common.realtime import DT_CTRL
from opendbc.can.packer import CANPacker
@@ -127,7 +126,8 @@ class CarController:
def update(self, CC, CS, now_nanos):
actuators = CC.actuators
hud_control = CC.hudControl
- hud_v_cruise = hud_control.setSpeed * CV.MS_TO_KPH if hud_control.speedVisible else 255
+ conversion = hondacan.get_cruise_speed_conversion(self.CP.carFingerprint, CS.is_metric)
+ hud_v_cruise = hud_control.setSpeed / conversion if hud_control.speedVisible else 255
pcm_cancel_cmd = CC.cruiseControl.cancel
if CC.longActive:
@@ -161,7 +161,7 @@ class CarController:
can_sends = []
# tester present - w/ no response (keeps radar disabled)
- if self.CP.carFingerprint in HONDA_BOSCH and self.CP.openpilotLongitudinalControl:
+ if self.CP.carFingerprint in (HONDA_BOSCH - HONDA_BOSCH_RADARLESS) and self.CP.openpilotLongitudinalControl:
if self.frame % 10 == 0:
can_sends.append((0x18DAB0F1, 0, b"\x02\x3E\x80\x00\x00\x00\x00\x00", 1))
diff --git a/selfdrive/car/honda/carstate.py b/selfdrive/car/honda/carstate.py
index 16880d1b1f..8189800368 100644
--- a/selfdrive/car/honda/carstate.py
+++ b/selfdrive/car/honda/carstate.py
@@ -5,7 +5,7 @@ from common.conversions import Conversions as CV
from common.numpy_fast import interp
from opendbc.can.can_define import CANDefine
from opendbc.can.parser import CANParser
-from selfdrive.car.honda.hondacan import get_pt_bus
+from selfdrive.car.honda.hondacan import get_cruise_speed_conversion, get_pt_bus
from selfdrive.car.honda.values import CAR, DBC, STEER_THRESHOLD, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_ALT_BRAKE_SIGNAL, HONDA_BOSCH_RADARLESS
from selfdrive.car.interfaces import CarStateBase
@@ -246,8 +246,7 @@ class CarState(CarStateBase):
ret.cruiseState.nonAdaptive = acc_hud["CRUISE_CONTROL_LABEL"] != 0
ret.cruiseState.standstill = acc_hud["CRUISE_SPEED"] == 252.
- # on certain cars, CRUISE_SPEED changes to imperial with car's unit setting
- conversion = CV.MPH_TO_MS if self.CP.carFingerprint in HONDA_BOSCH_RADARLESS and not self.is_metric else CV.KPH_TO_MS
+ conversion = get_cruise_speed_conversion(self.CP.carFingerprint, self.is_metric)
# On set, cruise set speed pulses between 254~255 and the set speed prev is set to avoid this.
ret.cruiseState.speed = self.v_cruise_pcm_prev if acc_hud["CRUISE_SPEED"] > 160.0 else acc_hud["CRUISE_SPEED"] * conversion
self.v_cruise_pcm_prev = ret.cruiseState.speed
diff --git a/selfdrive/car/honda/hondacan.py b/selfdrive/car/honda/hondacan.py
index 17681444af..b7c448d1d3 100644
--- a/selfdrive/car/honda/hondacan.py
+++ b/selfdrive/car/honda/hondacan.py
@@ -21,6 +21,11 @@ def get_lkas_cmd_bus(car_fingerprint, radar_disabled=False):
return 0
+def get_cruise_speed_conversion(car_fingerprint: str, is_metric: bool) -> float:
+ # on certain cars, CRUISE_SPEED changes to imperial with car's unit setting
+ return CV.MPH_TO_MS if car_fingerprint in HONDA_BOSCH_RADARLESS and not is_metric else CV.KPH_TO_MS
+
+
def create_brake_command(packer, apply_brake, pump_on, pcm_override, pcm_cancel_cmd, fcw, car_fingerprint, stock_brake):
# TODO: do we loose pressure if we keep pump off for long?
brakelights = apply_brake > 0
@@ -58,27 +63,36 @@ def create_acc_commands(packer, enabled, active, accel, gas, stopping, car_finge
standstill = 1 if active and stopping else 0
standstill_release = 1 if active and not stopping else 0
+ # common ACC_CONTROL values
acc_control_values = {
- # setting CONTROL_ON causes car to set POWERTRAIN_DATA->ACC_STATUS = 1
- "CONTROL_ON": control_on,
- "GAS_COMMAND": gas_command, # used for gas
- "ACCEL_COMMAND": accel_command, # used for brakes
- "BRAKE_LIGHTS": braking,
- "BRAKE_REQUEST": braking,
- "STANDSTILL": standstill,
- "STANDSTILL_RELEASE": standstill_release,
+ 'ACCEL_COMMAND': accel_command,
+ 'STANDSTILL': standstill,
}
- commands.append(packer.make_can_msg("ACC_CONTROL", bus, acc_control_values))
- acc_control_on_values = {
- "SET_TO_3": 0x03,
- "CONTROL_ON": enabled,
- "SET_TO_FF": 0xff,
- "SET_TO_75": 0x75,
- "SET_TO_30": 0x30,
- }
- commands.append(packer.make_can_msg("ACC_CONTROL_ON", bus, acc_control_on_values))
+ if car_fingerprint in HONDA_BOSCH_RADARLESS:
+ acc_control_values.update({
+ "CONTROL_ON": enabled,
+ "IDLESTOP_ALLOW": 0, # disallows idle stop
+ })
+ else:
+ acc_control_values.update({
+ # setting CONTROL_ON causes car to set POWERTRAIN_DATA->ACC_STATUS = 1
+ "CONTROL_ON": control_on,
+ "GAS_COMMAND": gas_command, # used for gas
+ "BRAKE_LIGHTS": braking,
+ "BRAKE_REQUEST": braking,
+ "STANDSTILL_RELEASE": standstill_release,
+ })
+ acc_control_on_values = {
+ "SET_TO_3": 0x03,
+ "CONTROL_ON": enabled,
+ "SET_TO_FF": 0xff,
+ "SET_TO_75": 0x75,
+ "SET_TO_30": 0x30,
+ }
+ commands.append(packer.make_can_msg("ACC_CONTROL_ON", bus, acc_control_on_values))
+ commands.append(packer.make_can_msg("ACC_CONTROL", bus, acc_control_values))
return commands
diff --git a/selfdrive/car/honda/interface.py b/selfdrive/car/honda/interface.py
index d3cf9fa891..7314afd50a 100755
--- a/selfdrive/car/honda/interface.py
+++ b/selfdrive/car/honda/interface.py
@@ -37,13 +37,11 @@ class CarInterface(CarInterfaceBase):
if candidate in HONDA_BOSCH:
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.hondaBosch)]
ret.radarUnavailable = True
-
- if candidate not in HONDA_BOSCH_RADARLESS:
- # Disable the radar and let openpilot control longitudinal
- # WARNING: THIS DISABLES AEB!
- ret.experimentalLongitudinalAvailable = True
- ret.openpilotLongitudinalControl = experimental_long
-
+ # Disable the radar and let openpilot control longitudinal
+ # WARNING: THIS DISABLES AEB!
+ # If Bosch radarless, this blocks ACC messages from the camera
+ ret.experimentalLongitudinalAvailable = True
+ ret.openpilotLongitudinalControl = experimental_long
ret.pcmCruise = not ret.openpilotLongitudinalControl
else:
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.hondaNidec)]
@@ -75,6 +73,8 @@ class CarInterface(CarInterfaceBase):
ret.longitudinalTuning.kpV = [0.25]
ret.longitudinalTuning.kiV = [0.05]
ret.longitudinalActuatorDelayUpperBound = 0.5 # s
+ if candidate in HONDA_BOSCH_RADARLESS:
+ ret.stopAccel = -4.0
else:
# default longitudinal tuning for all hondas
ret.longitudinalTuning.kpBP = [0., 5., 35.]