|
|
|
@ -4,8 +4,8 @@ from panda import Panda |
|
|
|
|
from openpilot.common.conversions import Conversions as CV |
|
|
|
|
from openpilot.common.numpy_fast import interp |
|
|
|
|
from openpilot.selfdrive.car.honda.hondacan import CanBus |
|
|
|
|
from openpilot.selfdrive.car.honda.values import CarControllerParams, CruiseButtons, HondaFlags, CAR, HONDA_BOSCH, HONDA_NIDEC_ALT_SCM_MESSAGES, \ |
|
|
|
|
HONDA_BOSCH_RADARLESS |
|
|
|
|
from openpilot.selfdrive.car.honda.values import CarControllerParams, CruiseButtons, CruiseSettings, HondaFlags, CAR, HONDA_BOSCH, \ |
|
|
|
|
HONDA_NIDEC_ALT_SCM_MESSAGES, HONDA_BOSCH_RADARLESS |
|
|
|
|
from openpilot.selfdrive.car import create_button_events, get_safety_config |
|
|
|
|
from openpilot.selfdrive.car.interfaces import CarInterfaceBase |
|
|
|
|
from openpilot.selfdrive.car.disable_ecu import disable_ecu |
|
|
|
@ -16,6 +16,7 @@ EventName = car.CarEvent.EventName |
|
|
|
|
TransmissionType = car.CarParams.TransmissionType |
|
|
|
|
BUTTONS_DICT = {CruiseButtons.RES_ACCEL: ButtonType.accelCruise, CruiseButtons.DECEL_SET: ButtonType.decelCruise, |
|
|
|
|
CruiseButtons.MAIN: ButtonType.altButton3, CruiseButtons.CANCEL: ButtonType.cancel} |
|
|
|
|
SETTINGS_BUTTONS_DICT = {CruiseSettings.DISTANCE: ButtonType.gapAdjustCruise, CruiseSettings.LKAS: ButtonType.altButton1} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CarInterface(CarInterfaceBase): |
|
|
|
@ -236,7 +237,7 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
|
|
|
|
|
ret.buttonEvents = [ |
|
|
|
|
*create_button_events(self.CS.cruise_buttons, self.CS.prev_cruise_buttons, BUTTONS_DICT), |
|
|
|
|
*create_button_events(self.CS.cruise_setting, self.CS.prev_cruise_setting, {1: ButtonType.altButton1}), |
|
|
|
|
*create_button_events(self.CS.cruise_setting, self.CS.prev_cruise_setting, SETTINGS_BUTTONS_DICT), |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
# events |
|
|
|
|