Force auto tune

This commit is contained in:
FrogAi
2024-02-27 16:34:47 -07:00
parent 081646bd0a
commit cd12d8bd00
4 changed files with 5 additions and 2 deletions

View File

@@ -677,7 +677,7 @@ class Controls:
# Update Torque Params
if self.CP.lateralTuning.which() == 'torque':
torque_params = self.sm['liveTorqueParameters']
if self.sm.all_checks(['liveTorqueParameters']) and torque_params.useParams:
if self.sm.all_checks(['liveTorqueParameters']) and (torque_params.useParams or self.force_auto_tune):
self.LaC.update_live_torque_params(torque_params.latAccelFactorFiltered, torque_params.latAccelOffsetFiltered,
torque_params.frictionCoefficientFiltered)
@@ -1028,6 +1028,7 @@ class Controls:
self.frogpilot_variables.experimental_mode_via_lkas = experimental_mode_activation and self.params.get_bool("ExperimentalModeViaLKAS")
lateral_tune = self.params.get_bool("LateralTune")
self.force_auto_tune = lateral_tune and self.params.get_float("ForceAutoTune")
longitudinal_tune = self.params.get_bool("LongitudinalTune")
self.frogpilot_variables.sport_plus = longitudinal_tune and self.params.get_int("AccelerationProfile") == 3