예제 #1
0
  def __init__(self, CP, sendcan=None):
    self.CP = CP

    self.frame = 0
    self.can_invalid_count = 0
    self.acc_active_prev = 0

    # *** init the major players ***
    self.CS = CarState(CP)
    self.VM = VehicleModel(CP)
    self.pt_cp = get_powertrain_can_parser(CP)

    # sending if read only is False
    if sendcan is not None:
      self.sendcan = sendcan
      self.CC = CarController(CP.carFingerprint)
예제 #2
0
    def __init__(self, CP, CarController):
        self.CP = CP

        self.frame = 0
        self.acc_active_prev = 0
        self.gas_pressed_prev = False

        # *** init the major players ***
        self.CS = CarState(CP)
        self.VM = VehicleModel(CP)
        self.pt_cp = get_powertrain_can_parser(CP)
        self.cam_cp = get_camera_can_parser(CP)

        self.gas_pressed_prev = False

        self.CC = None
        if CarController is not None:
            self.CC = CarController(CP.carFingerprint)