|
|
|
@ -1,10 +1,12 @@ |
|
|
|
|
#!/usr/bin/env python3 |
|
|
|
|
from cereal import car |
|
|
|
|
from panda import Panda |
|
|
|
|
from openpilot.selfdrive.car import get_safety_config |
|
|
|
|
from openpilot.selfdrive.car import create_button_events, get_safety_config |
|
|
|
|
from openpilot.selfdrive.car.chrysler.values import CAR, RAM_HD, RAM_DT, RAM_CARS, ChryslerFlags |
|
|
|
|
from openpilot.selfdrive.car.interfaces import CarInterfaceBase |
|
|
|
|
|
|
|
|
|
ButtonType = car.CarState.ButtonEvent.Type |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class CarInterface(CarInterfaceBase): |
|
|
|
|
@staticmethod |
|
|
|
@ -76,6 +78,8 @@ class CarInterface(CarInterfaceBase): |
|
|
|
|
def _update(self, c): |
|
|
|
|
ret = self.CS.update(self.cp, self.cp_cam) |
|
|
|
|
|
|
|
|
|
ret.buttonEvents = create_button_events(self.CS.distance_button, self.CS.prev_distance_button, {1: ButtonType.gapAdjustCruise}) |
|
|
|
|
|
|
|
|
|
# events |
|
|
|
|
events = self.create_common_events(ret, extra_gears=[car.CarState.GearShifter.low]) |
|
|
|
|
|
|
|
|
|