Trailer Load Gas Tuning

This commit is contained in:
firestar5683
2025-12-12 01:01:16 -06:00
parent 0e93ceef00
commit 4cfd893837
26 changed files with 369 additions and 13 deletions
@@ -98,6 +98,11 @@ FrogPilotLongitudinalPanel::FrogPilotLongitudinalPanel(
"fine-tune how openpilot drives."),
"../../frogpilot/assets/toggle_icons/"
"icon_advanced_longitudinal_tune.png"},
{"EVTuning", tr("EV Tuning"),
tr("<b>Use acceleration profiles tuned for EVs.</b> Defaults to the "
"vehicle's detected powertrain type but can be overridden if the "
"automatic choice doesn't match."),
""},
{"LongitudinalActuatorDelay",
longitudinalActuatorDelay != 0
? QString(tr("Actuator Delay (Default: %1)"))
@@ -428,6 +433,11 @@ FrogPilotLongitudinalPanel::FrogPilotLongitudinalPanel(
{"MaxDesiredAcceleration", tr("Maximum Acceleration"),
tr("<b>Limit the strongest acceleration</b> openpilot can command."),
""},
{"TrailerLoad", tr("Trailer Load"),
tr("<b>Increase the vehicle mass to account for towing.</b> Adjust "
"in 500 lb steps up to 15,000 lbs to fine-tune gas and brake "
"behavior when pulling a trailer."),
""},
{"TacoTune", tr("\"Taco Bell Run\" Turn Speed Hack"),
tr("<b>The turn-speed hack from comma's 2022 \"Taco Bell Run\".</b> "
"Designed to slow down for left and right turns."),
@@ -871,6 +881,10 @@ FrogPilotLongitudinalPanel::FrogPilotLongitudinalPanel(
longitudinalToggle = new FrogPilotParamValueControl(
param, title, desc, icon, 0.1, 4.0, tr(" m/s²"),
std::map<float, QString>(), 0.1);
} else if (param == "TrailerLoad") {
longitudinalToggle = new FrogPilotParamValueControl(
param, title, desc, icon, 0, 15000, tr(" lbs"),
std::map<float, QString>(), 500);
} else if (param == "QOLLongitudinal") {
FrogPilotManageControl *qolLongitudinalToggle =
@@ -40,12 +40,12 @@ private:
std::map<QString, AbstractControl*> toggles;
QSet<QString> advancedLongitudinalTuneKeys = {"LongitudinalActuatorDelay", "StartAccel", "StopAccel", "StoppingDecelRate", "VEgoStarting", "VEgoStopping"};
QSet<QString> advancedLongitudinalTuneKeys = {"EVTuning", "LongitudinalActuatorDelay", "StartAccel", "StopAccel", "StoppingDecelRate", "VEgoStarting", "VEgoStopping"};
QSet<QString> aggressivePersonalityKeys = {"AggressiveFollow", "AggressiveFollowHigh", "AggressiveJerkAcceleration", "AggressiveJerkDeceleration", "AggressiveJerkDanger", "AggressiveJerkSpeed", "AggressiveJerkSpeedDecrease", "ResetAggressivePersonality"};
QSet<QString> conditionalExperimentalKeys = {"CESpeed", "CESpeedLead", "CECurves", "CELead", "CEModelStopTime", "CENavigation", "CESignalSpeed", "ShowCEMStatus"};
QSet<QString> curveSpeedKeys = {"CalibratedLateralAcceleration", "CalibrationProgress", "ResetCurveData", "ShowCSCStatus"};
QSet<QString> customDrivingPersonalityKeys = {"AggressivePersonalityProfile", "RelaxedPersonalityProfile", "StandardPersonalityProfile", "TrafficPersonalityProfile"};
QSet<QString> longitudinalTuneKeys = {"AccelerationProfile", "DecelerationProfile", "HumanAcceleration", "HumanFollowing", "LeadDetectionThreshold", "MaxDesiredAcceleration", "TacoTune"};
QSet<QString> longitudinalTuneKeys = {"AccelerationProfile", "DecelerationProfile", "HumanAcceleration", "HumanFollowing", "LeadDetectionThreshold", "MaxDesiredAcceleration", "TrailerLoad", "TacoTune"};
QSet<QString> qolKeys = {"CustomCruise", "CustomCruiseLong", "ForceStops", "IncreasedStoppedDistance", "MapGears", "ReverseCruise", "SetSpeedOffset"};
QSet<QString> relaxedPersonalityKeys = {"RelaxedFollow", "RelaxedFollowHigh", "RelaxedJerkAcceleration", "RelaxedJerkDeceleration", "RelaxedJerkDanger", "RelaxedJerkSpeed", "RelaxedJerkSpeedDecrease", "ResetRelaxedPersonality"};
QSet<QString> speedLimitControllerKeys = {"SLCOffsets", "SLCFallback", "SLCOverride", "SLCPriority", "SLCQOL", "SLCVisuals"};