wip
This commit is contained in:
@@ -604,7 +604,8 @@ class Controls:
|
||||
else:
|
||||
self.state = State.enabled
|
||||
self.current_alert_types.append(ET.ENABLE)
|
||||
self.v_cruise_helper.initialize_v_cruise(CS, self.frogpilot_variables, self.experimental_mode, self.conditional_experimental_mode)
|
||||
self.v_cruise_helper.initialize_v_cruise(CS, self.experimental_mode, self.conditional_experimental_mode)
|
||||
# self.v_cruise_helper.initialize_v_cruise(CS, self.frogpilot_variables, self.experimental_mode, self.conditional_experimental_mode)
|
||||
|
||||
# Check if openpilot is engaged and actuators are enabled
|
||||
self.enabled = self.state in ENABLED_STATES
|
||||
@@ -1002,8 +1003,8 @@ class Controls:
|
||||
|
||||
self.average_desired_curvature = self.params.get_bool("AverageCurvature")
|
||||
self.conditional_experimental_mode = self.params.get_bool("ConditionalExperimental")
|
||||
self.frogpilot_variables.CSLC = self.params.get_bool("CSLCEnabled")
|
||||
self.frogpilot_variables.CSLCA = self.params.get_bool("CSLCAvailable")
|
||||
# self.frogpilot_variables.CSLC = self.params.get_bool("CSLCEnabled")
|
||||
# self.frogpilot_variables.CSLCA = self.params.get_bool("CSLCAvailable")
|
||||
|
||||
custom_theme = self.params.get_bool("CustomTheme")
|
||||
custom_sounds = self.params.get_int("CustomSounds") if custom_theme else 0
|
||||
|
||||
@@ -134,15 +134,15 @@ class VCruiseHelper:
|
||||
self.button_timers[b.type.raw] = 1 if b.pressed else 0
|
||||
self.button_change_states[b.type.raw] = {"standstill": CS.cruiseState.standstill, "enabled": enabled}
|
||||
|
||||
def initialize_v_cruise(self, CS, frogpilot_variables, experimental_mode: bool, conditional_experimental_mode) -> None:
|
||||
def initialize_v_cruise(self, CS, experimental_mode: bool, conditional_experimental_mode) -> None:
|
||||
# initializing is handled by the PCM
|
||||
if self.CP.pcmCruise and not frogpilot_variables.CSLC:
|
||||
if self.CP.pcmCruise:
|
||||
return
|
||||
|
||||
if frogpilot_variables.CSLC:
|
||||
self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH
|
||||
self.v_cruise_cluster_kph = self.v_cruise_kph
|
||||
return
|
||||
# if frogpilot_variables.CSLC:
|
||||
# self.v_cruise_kph = CS.cruiseState.speed * CV.MS_TO_KPH
|
||||
# self.v_cruise_cluster_kph = self.v_cruise_kph
|
||||
# return
|
||||
|
||||
initial = V_CRUISE_INITIAL_EXPERIMENTAL_MODE if experimental_mode and not conditional_experimental_mode else V_CRUISE_INITIAL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user