civic22_long

pull/25364/head
royjr 3 years ago
parent 467bbffa0f
commit 494dab51ae
  1. 2
      cereal
  2. 2
      opendbc
  3. 2
      panda
  4. 49
      selfdrive/car/honda/hondacan.py
  5. 12
      selfdrive/car/honda/interface.py

@ -1 +1 @@
Subproject commit 2335f98bbe628ec6fde92c8d929ecaf373b125af
Subproject commit 589ef049a7b0bac31f4c8987c0fc539839fae489

@ -1 +1 @@
Subproject commit e95ed311c10547026143b539a33341425cbec9ea
Subproject commit b913296c9123441b2b271c00239929ed388169b5

@ -1 +1 @@
Subproject commit 19983f13b37518298a3c282d5069c090b68f6864
Subproject commit a45e99b16645783a65e84d7b6d0b59d639ebff47

@ -51,33 +51,40 @@ def create_acc_commands(packer, enabled, active, accel, gas, stopping, car_finge
min_gas_accel = CarControllerParams.BOSCH_GAS_LOOKUP_BP[0]
control_on = 5 if enabled else 0
control_off = not enabled
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 not stopping else 0
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,
}
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 = {
"CONTROL_ON": control_on,
"CONTROL_OFF": control_off,
"ACCEL_COMMAND": accel_command,
}
commands.append(packer.make_can_msg("ACC_CONTROL", bus, acc_control_values))
else:
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,
}
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))
return commands

@ -36,13 +36,11 @@ class CarInterface(CarInterfaceBase):
if candidate in HONDA_BOSCH:
ret.safetyConfigs = [get_safety_config(car.CarParams.SafetyModel.hondaBosch)]
ret.radarOffCan = 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)]

Loading…
Cancel
Save