Ejemplo n.º 1
0
  def __init__(self, dbc_name, CP, VM):
    self.car_fingerprint = CP.carFingerprint
    self.packer = CANPacker(dbc_name)
    self.accel_steady = 0
    self.apply_steer_last = 0
    self.steer_rate_limited = False
    self.lkas11_cnt = 0
    self.scc12_cnt = 0

    self.resume_cnt = 0
    self.last_lead_distance = 0
    self.resume_wait_timer = 0

    self.turning_signal_timer = 0
    self.longcontrol = CP.openpilotLongitudinalControl
    self.scc_live = not CP.radarOffCan

    if CP.spasEnabled:
      self.en_cnt = 0
      self.apply_steer_ang = 0.0
      self.en_spas = 3
      self.mdps11_stat_last = 0
      self.spas_always = False

    self.scc_smoother = SccSmoother(accel_gain=1.0, decel_gain=1.0, curvature_gain=0.8)
Ejemplo n.º 2
0
    def __init__(self, dbc_name, CP, VM):
        self.car_fingerprint = CP.carFingerprint
        self.packer = CANPacker(dbc_name)
        self.apply_steer_last = 0
        self.accel = 0
        self.lkas11_cnt = 0
        self.scc12_cnt = -1

        self.resume_cnt = 0
        self.last_lead_distance = 0
        self.resume_wait_timer = 0

        self.turning_signal_timer = 0
        self.longcontrol = CP.openpilotLongitudinalControl
        self.scc_live = not CP.radarOffCan

        self.turning_indicator_alert = False

        param = Params()

        self.mad_mode_enabled = param.get_bool('MadModeEnabled')
        self.ldws_opt = param.get_bool('IsLdwsCar')
        self.stock_navi_decel_enabled = param.get_bool('StockNaviDecelEnabled')
        self.keep_steering_turn_signals = param.get_bool(
            'KeepSteeringTurnSignals')
        self.haptic_feedback_speed_camera = param.get_bool(
            'HapticFeedbackWhenSpeedCamera')

        self.scc_smoother = SccSmoother()
        self.last_blinker_frame = 0
        self.prev_active_cam = False
        self.active_cam_timer = 0
Ejemplo n.º 3
0
    def __init__(self, dbc_name, CP, VM):
        self.car_fingerprint = CP.carFingerprint
        self.packer = CANPacker(dbc_name)
        self.apply_steer_last = 0
        self.steer_rate_limited = False
        self.lkas11_cnt = 0
        self.scc12_cnt = -1

        self.resume_cnt = 0
        self.last_lead_distance = 0
        self.resume_wait_timer = 0

        self.turning_signal_timer = 0
        self.longcontrol = CP.openpilotLongitudinalControl
        self.scc_live = not CP.radarOffCan

        self.turning_indicator_alert = False

        param = Params()

        self.mad_mode_enabled = param.get_bool('MadModeEnabled')
        self.ldws_opt = param.get_bool('IsLdwsCar')
        self.stock_navi_decel_enabled = param.get_bool('StockNaviDecelEnabled')
        self.keep_steering_turn_signals = param.get_bool(
            'KeepSteeringTurnSignals')
        self.warning_over_speed_limit = param.get_bool('WarningOverSpeedLimit')

        # gas_factor, brake_factor
        # Adjust it in the range of 0.7 to 1.3
        self.scc_smoother = SccSmoother()
        self.last_blinker_frame = 0
Ejemplo n.º 4
0
    def __init__(self, dbc_name, CP, VM):
        self.car_fingerprint = CP.carFingerprint
        self.packer = CANPacker(dbc_name)
        self.accel_steady = 0
        self.apply_steer_last = 0
        self.steer_rate_limited = False
        self.lkas11_cnt = 0
        self.scc12_cnt = -1

        self.resume_cnt = 0
        self.last_lead_distance = 0
        self.resume_wait_timer = 0

        self.turning_signal_timer = 0
        self.longcontrol = CP.openpilotLongitudinalControl
        self.scc_live = not CP.radarOffCan

        self.mad_mode_enabled = Params().get_bool('MadModeEnabled')
        self.ldws_opt = Params().get_bool('IsLdwsCar')
        self.stock_navi_decel_enabled = Params().get_bool(
            'StockNaviDecelEnabled')

        # gas_factor, brake_factor
        # Adjust it in the range of 0.7 to 1.3
        self.scc_smoother = SccSmoother()
Ejemplo n.º 5
0
    def __init__(self, dbc_name, CP, VM):
        self.car_fingerprint = CP.carFingerprint
        self.packer = CANPacker(dbc_name)
        self.accel_steady = 0
        self.apply_steer_last = 0
        self.steer_rate_limited = False
        self.lkas11_cnt = 0
        self.scc12_cnt = 0

        self.resume_cnt = 0
        self.last_lead_distance = 0
        self.resume_wait_timer = 0

        self.turning_signal_timer = 0
        self.longcontrol = CP.openpilotLongitudinalControl
        self.scc_live = not CP.radarOffCan

        self.mad_mode_enabled = Params().get_bool('MadModeEnabled')

        self.scc_smoother = SccSmoother(1.0)