mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-18 10:23:43 +08:00
Add HKG Angle Live Tuning parameter and update related handling
This commit is contained in:
@@ -173,6 +173,6 @@ inline static std::unordered_map<std::string, uint32_t> keys = {
|
||||
{"HkgTuningAngleMinTorque", PERSISTENT | BACKUP},
|
||||
{"HkgTuningAngleMaxTorque", PERSISTENT | BACKUP},
|
||||
{"HkgTuningOverridingCycles", PERSISTENT | BACKUP},
|
||||
{"AngleTuning", PERSISTENT | BACKUP}
|
||||
{"HkgAngleLiveTuning", PERSISTENT | BACKUP}
|
||||
|
||||
};
|
||||
|
||||
@@ -21,6 +21,9 @@ AngleTunningSettings::AngleTunningSettings(QWidget *parent) : QWidget(parent) {
|
||||
|
||||
auto *list = new ListWidget(this, false);
|
||||
|
||||
hkgAngleLiveTuning = new ParamControlSP("HkgAngleLiveTuning", tr("HKG Angle Live Tuning"), tr("Enable live tuning of the steering wheel angle."), "../assets/offroad/icon_blank.png");
|
||||
list->addItem(hkgAngleLiveTuning);
|
||||
|
||||
auto first_row = new QHBoxLayout();
|
||||
hkgAngleSmoothingFactor = new OptionControlSP("HkgTuningAngleSmoothingFactor", tr("HKG Angle Smoothing Factor"), tr("Applies EMA (Exponential Moving Average) to the desired angle steering.<br/>A value closer to 1 means no smoothing.<br/>A value closer to 0 means very smooth (and thus likely too 'soft' steering).<br/>After 50mph/80km/h this setting is virtually always 1."), "../assets/offroad/icon_blank.png", {0, 10}, 1);
|
||||
connect(hkgAngleSmoothingFactor, &OptionControlSP::updateLabels, hkgAngleSmoothingFactor, [=]() {
|
||||
|
||||
@@ -34,4 +34,5 @@ private:
|
||||
OptionControlSP* hkgAngleMinTorque;
|
||||
OptionControlSP* hkgAngleMaxTorque;
|
||||
OptionControlSP* hkgTuningOverridingCycles;
|
||||
ParamControlSP* hkgAngleLiveTuning;
|
||||
};
|
||||
|
||||
@@ -55,7 +55,7 @@ def manager_init() -> None:
|
||||
("ModelManager_ModelsCache", ""),
|
||||
("NeuralNetworkLateralControl", "0"),
|
||||
("QuietMode", "0"),
|
||||
("HkgTuningAngleSmoothingFactor", "6"),
|
||||
("HkgTuningAngleSmoothingFactor", "0"),
|
||||
("HkgTuningAngleMinTorque", "25"),
|
||||
("HkgTuningAngleMaxTorque", "250"),
|
||||
("HkgTuningOverridingCycles", "17"),
|
||||
|
||||
Reference in New Issue
Block a user