This commit is contained in:
concordia
2024-02-08 12:46:30 -06:00
parent 7853d218a3
commit 90b8e9f072
5 changed files with 37 additions and 32 deletions

View File

@@ -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