mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-23 23:02:04 +08:00
fix visual_style_overhead_threshold_settings
This commit is contained in:
@@ -177,19 +177,19 @@ VisualsPanel::VisualsPanel(QWidget *parent) : QWidget(parent) {
|
||||
|
||||
|
||||
// Visual Style Overhead Threshold
|
||||
visual_style_threshold_settings = new OptionControlSP("VisualStyleOverheadThreshold", tr("Visual Style Overhead Threshold"),
|
||||
visual_style_overhead_threshold_settings = new OptionControlSP("VisualStyleOverheadThreshold", tr("Visual Style Overhead Threshold"),
|
||||
tr("Adjust the threshold when overhead blend activates."),
|
||||
"", {10, 80}, 5, false, nullptr, false);
|
||||
|
||||
connect(visual_style_threshold_settings, &OptionControlSP::updateLabels, [=]() {
|
||||
connect(visual_style_overhead_threshold_settings, &OptionControlSP::updateLabels, [=]() {
|
||||
int value = QString::fromStdString(params.get("VisualStyleOverheadThreshold")).toInt();
|
||||
visual_style_threshold_settings->setLabel(QString::number(value) + " mph");
|
||||
visual_style_overhead_threshold_settings->setLabel(QString::number(value) + " mph");
|
||||
});
|
||||
|
||||
int value = QString::fromStdString(params.get("VisualStyleOverheadThreshold")).toInt();
|
||||
visual_style_threshold_settings->setLabel(QString::number(value) + " mph");
|
||||
visual_style_overhead_threshold_settings->setLabel(QString::number(value) + " mph");
|
||||
|
||||
list->addItem(visual_style_threshold_settings);
|
||||
list->addItem(visual_style_overhead_threshold_settings);
|
||||
|
||||
|
||||
// Visuals: Display Metrics below Chevron
|
||||
|
||||
Reference in New Issue
Block a user