def __init__(self, CP, CarController): self.CP = CP self.VM = VehicleModel(CP) self.frame = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False self.cruise_enabled_prev = False self.low_speed_alert = False self.blinker_status = 0 self.blinker_timer = 0 # *** init the major players *** self.CS = CarState(CP) self.cp = get_can_parser(CP) self.cp2 = get_can2_parser(CP) self.cp_cam = get_camera_parser(CP) self.cp_AVM = get_AVM_parser(CP) self.CC = None if CarController is not None: self.CC = CarController(self.cp.dbc_name, CP.carFingerprint) self.traceLKA = trace1.Loger("LKA") self.traceCLU = trace1.Loger("clu11") self.traceSCC = trace1.Loger("scc12") self.traceMDPS = trace1.Loger("mdps12") self.traceCGW = trace1.Loger("CGW1") self.params = Params()
def __init__(self, CP, CarController): self.CP = CP self.VM = VehicleModel(CP) self.frame = 0 self.gas_pressed_prev = False self.brake_pressed_prev = False self.cruise_enabled_prev = False self.low_speed_alert = False # *** init the major players *** self.CS = CarState(CP) self.cp = get_can_parser(CP) self.cp2 = get_can2_parser(CP) self.cp_cam = get_camera_parser(CP) self.CC = None if CarController is not None: self.CC = CarController(self.cp.dbc_name, CP.carFingerprint)