wip
This commit is contained in:
@@ -156,7 +156,8 @@ class CarController:
|
||||
|
||||
# CSLC
|
||||
if CC.enabled and CC.experimental_mode and CS.cruiseState.available and not CS.out.gasPressed and CS.cruise_buttons == Buttons.NONE:
|
||||
cslcSetSpeed = get_set_speed(self, hud_v_cruise)
|
||||
# cslcSetSpeed = get_set_speed(self, hud_v_cruise)
|
||||
cslcSetSpeed = set_speed_in_units
|
||||
self.cruise_button = get_cslc_button(self, cslcSetSpeed, CS)
|
||||
if self.cruise_button != Buttons.NONE:
|
||||
# if self.CP.carFingerprint in LEGACY_SAFETY_MODE_CAR:
|
||||
@@ -260,7 +261,7 @@ def get_set_speed(self, hud_v_cruise):
|
||||
v_cruise = int(round(v_cruise_kph * CV.KPH_TO_MPH))
|
||||
|
||||
v_cruise_slc: int = 0
|
||||
v_cruise_slc = params_memory.get_int("CSLCSpeed")
|
||||
# v_cruise_slc = params_memory.get_int("CSLCSpeed")
|
||||
|
||||
if v_cruise_slc > 0:
|
||||
v_cruise = v_cruise_slc
|
||||
@@ -272,7 +273,7 @@ def get_cslc_button(self, cslcSetSpeed, CS):
|
||||
|
||||
if cslcSetSpeed < speedSetPoint and speedSetPoint > 25:
|
||||
cruiseBtn = Buttons.SET_DECEL
|
||||
elif cslcSetSpeed > speedSetPoint:
|
||||
elif cslcSetSpeed > speedSetPoint and speedSetPoint < 75:
|
||||
cruiseBtn = Buttons.RES_ACCEL
|
||||
else:
|
||||
cruiseBtn = Buttons.NONE
|
||||
|
||||
@@ -135,7 +135,7 @@ class ConditionalExperimentalMode:
|
||||
self.lead_detection(radarState)
|
||||
self.road_curvature(modelData, v_ego)
|
||||
self.slow_lead(mpc, radarState, v_ego)
|
||||
self.stop_sign_and_light(modelData, v_ego)
|
||||
# self.stop_sign_and_light(modelData, v_ego)
|
||||
self.v_ego_slowing_down(v_ego)
|
||||
self.v_lead_slowing_down(mpc, radarState)
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ class FrogPilotPlanner:
|
||||
self.x_desired_trajectory_full = np.interp(ModelConstants.T_IDXS, T_IDXS_MPC, mpc.x_solution)
|
||||
self.x_desired_trajectory = self.x_desired_trajectory_full[:CONTROL_N]
|
||||
|
||||
self.params_memory.put_int("CSLCSpeed", int(round(self.v_cruise * CV.MS_TO_MPH)))
|
||||
# self.params_memory.put_int("CSLCSpeed", int(round(self.v_cruise * CV.MS_TO_MPH)))
|
||||
|
||||
def update_v_cruise(self, carState, controlsState, modelData, enabled, v_cruise, v_ego):
|
||||
# Pfeiferj's Map Turn Speed Controller
|
||||
@@ -212,7 +212,7 @@ class FrogPilotPlanner:
|
||||
def update_frogpilot_params(self, params, params_memory):
|
||||
self.is_metric = params.get_bool("IsMetric")
|
||||
|
||||
self.CSLC = params.get_bool("CSLCEnabled")
|
||||
# self.CSLC = params.get_bool("CSLCEnabled")
|
||||
|
||||
self.blindspot_path = params.get_bool("CustomUI") and params.get_bool("BlindSpotPath")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user