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

@@ -260,6 +260,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"ExperimentalModeViaLKAS", PERSISTENT},
{"ExperimentalModeViaScreen", PERSISTENT},
{"FireTheBabysitter", PERSISTENT},
{"ForceAutoTune", PERSISTENT},
{"FrogPilotTogglesUpdated", PERSISTENT},
{"FrogsGoMoo", PERSISTENT},
{"GoatScream", PERSISTENT},

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

View File

@@ -25,6 +25,7 @@ FrogPilotControlsPanel::FrogPilotControlsPanel(SettingsWindow *parent) : FrogPil
{"NoUploads", "Disable Uploads", "Turn off all data uploads to comma's servers.\n\nWARNING: This action will prevent your drives from appearing on comma connect which may impact debugging and support!", ""},
{"LateralTune", "Lateral Tuning", "Modify openpilot's steering behavior.", "../frogpilot/assets/toggle_icons/icon_lateral_tune.png"},
{"ForceAutoTune", "Force Auto Tune", "Forces comma's auto lateral tuning for unsupported vehicles.", ""},
{"LongitudinalTune", "Longitudinal Tuning", "Modify openpilot's acceleration and braking behavior.", "../frogpilot/assets/toggle_icons/icon_longitudinal_tune.png"},
{"AccelerationProfile", "Acceleration Profile", "Change the acceleration rate to be either sporty or eco-friendly.", ""},

View File

@@ -39,7 +39,7 @@ private:
std::set<QString> experimentalModeActivationKeys = {"ExperimentalModeViaDistance", "ExperimentalModeViaLKAS", "ExperimentalModeViaScreen"};
std::set<QString> fireTheBabysitterKeys = {"NoLogging", "MuteOverheated", "NoUploads"};
std::set<QString> laneChangeKeys = {};
std::set<QString> lateralTuneKeys = {};
std::set<QString> lateralTuneKeys = {"ForceAutoTune"};
std::set<QString> longitudinalTuneKeys = {"AccelerationProfile", "DecelerationProfile", "AggressiveAcceleration"};
std::set<QString> mtscKeys = {};
std::set<QString> qolKeys = {"DisableOnroadUploads"};