|
|
@ -2,7 +2,7 @@ |
|
|
|
from cereal import car |
|
|
|
from cereal import car |
|
|
|
from openpilot.common.conversions import Conversions as CV |
|
|
|
from openpilot.common.conversions import Conversions as CV |
|
|
|
from openpilot.selfdrive.car.mazda.values import CAR, LKAS_LIMITS |
|
|
|
from openpilot.selfdrive.car.mazda.values import CAR, LKAS_LIMITS |
|
|
|
from openpilot.selfdrive.car import get_safety_config |
|
|
|
from openpilot.selfdrive.car import create_button_events, get_safety_config |
|
|
|
from openpilot.selfdrive.car.interfaces import CarInterfaceBase |
|
|
|
from openpilot.selfdrive.car.interfaces import CarInterfaceBase |
|
|
|
|
|
|
|
|
|
|
|
ButtonType = car.CarState.ButtonEvent.Type |
|
|
|
ButtonType = car.CarState.ButtonEvent.Type |
|
|
@ -34,6 +34,9 @@ class CarInterface(CarInterfaceBase): |
|
|
|
def _update(self, c): |
|
|
|
def _update(self, c): |
|
|
|
ret = self.CS.update(self.cp, self.cp_cam) |
|
|
|
ret = self.CS.update(self.cp, self.cp_cam) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: add button types for inc and dec |
|
|
|
|
|
|
|
ret.buttonEvents = create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}) |
|
|
|
|
|
|
|
|
|
|
|
# events |
|
|
|
# events |
|
|
|
events = self.create_common_events(ret) |
|
|
|
events = self.create_common_events(ret) |
|
|
|
|
|
|
|
|
|
|
|