def __init__(self, CP, CarController): self.CP = CP self.frame = 0 self.last_enable_pressed = 0 self.last_enable_sent = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False self.cruise_enabled_prev = False self.cp = get_can_parser(CP) self.cp_cam = get_cam_can_parser(CP) # *** init the major players *** self.CS = CarState(CP) self.VM = VehicleModel(CP) self.CC = None if CarController is not None: self.CC = CarController(self.cp.dbc_name) if self.CS.CP.carFingerprint == CAR.ACURA_ILX: self.compute_gb = get_compute_gb_acura() else: self.compute_gb = compute_gb_honda
def __init__(self, CP, sendcan=None): self.CP = CP self.frame = 0 self.last_enable_pressed = 0 self.last_enable_sent = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False self.can_invalid_count = 0 self.cam_can_invalid_count = 0 self.cp = get_can_parser(CP) self.cp_cam = get_cam_can_parser(CP) # *** init the major players *** self.CS = CarState(CP) self.VM = VehicleModel(CP) # sending if read only is False if sendcan is not None: self.sendcan = sendcan self.CC = CarController(self.cp.dbc_name, CP.enableCamera) if self.CS.CP.carFingerprint == CAR.ACURA_ILX: self.compute_gb = get_compute_gb_acura() else: self.compute_gb = compute_gb_honda
def __init__(self, CP, CarController): self.CP = CP self.frame = 0 self.last_enable_pressed = 0 self.last_enable_sent = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False self.stock_cam_frame_prev = 0 self.cp = get_can_parser(CP) self.cp_cam = get_cam_can_parser(CP.isPandaBlack) self.CP.canIds = [[int(x) for x in self.cp.addr], [int(x) for x in self.cp_cam.addr]] # *** init the major players *** self.CS = CarState(CP) #self.VM = VehicleModel(CP) self.canTime = 0 self.CC = None if CarController is not None: self.CC = CarController(self.cp.dbc_name) if self.CS.CP.carFingerprint == CAR.ACURA_ILX: self.compute_gb = get_compute_gb_acura() else: self.compute_gb = compute_gb_honda if self.CS.CP.carFingerprint in HONDA_BOSCH and self.CS.CP.carFingerprint not in ( CAR.CRV_HYBRID, CAR.CRV, CAR.CRV_5G): self.bosch_honda = True else: self.bosch_honda = False