Formatting

This commit is contained in:
DevTekVE
2025-01-12 16:10:19 +01:00
parent f3598b172a
commit 6cfeb7c8ed
2 changed files with 5 additions and 5 deletions
@@ -183,7 +183,7 @@ class DynamicExperimentalController:
return LEAD_PROB + 0.1 # Increase the threshold on highways
return LEAD_PROB
def _update(self, car_state, lead_one, md, controls_state): #, maneuver_distance):
def _update(self, car_state, lead_one, md, controls_state): #, maneuver_distance):
self._v_ego_kph = car_state.vEgo * 3.6
self._v_cruise_kph = controls_state.vCruise
self._has_lead = lead_one.status
@@ -344,7 +344,7 @@ class DynamicExperimentalController:
def update(self, radar_unavailable, car_state, lead_one, md, controls_state): #, maneuver_distance):
if self._frame % 50 == 0:
self._is_enabled = self._params.get_bool("DynamicExperimentalControl")
if self._is_enabled:
self._update(car_state, lead_one, md, controls_state) #, maneuver_distance)
if radar_unavailable:
+3 -3
View File
@@ -3,11 +3,11 @@ MpcSource = custom.MpcSource
def get_mpc_mode(sm, dynamic_experimental_controller, mpc, CP):
"""
Determines the appropriate MPC mode based on the experimental state and system
configurations. It either returns a default mode or updates the dynamic
Determines the appropriate MPC mode based on the experimental state and system
configurations. It either returns a default mode or updates the dynamic
experimental controller and retrieves the updated mode.
:param is_experimental: A flag indicating whether to use the experimental mode.
:param is_experimental: A flag indicating whether to use the experimental mode.
If False, defaults to 'acc' mode.
:type is_experimental: bool