mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-09-03 23:03:41 +08:00
Update settings.cc
This commit is contained in:
@@ -105,15 +105,15 @@ InfiniteCableTogglesPanel::InfiniteCableTogglesPanel(SettingsWindow *parent) : L
|
||||
tr("Adjust steering angle offset manually (in degrees)."),
|
||||
"", {-1000, 1000}, 1, false, nullptr, true, true);
|
||||
|
||||
float stored_val = params.getFloat("AngleOffsetDegree");
|
||||
float stored_val = QString::fromStdString(params.get("AngleOffsetDegree")).toFloat();
|
||||
steer_offset_control->setLabel(QString::number(stored_val, 'f', 2) + "°");
|
||||
steer_offset_control->showDescription();
|
||||
addItem(steer_offset_control);
|
||||
|
||||
QObject::connect(steer_offset_control, &OptionControlSP::updateLabels, [=]() {
|
||||
float val = params.getFloat("AngleOffsetDegree");
|
||||
float val = QString::fromStdString(params.get("AngleOffsetDegree")).toFloat();
|
||||
steer_offset_control->setLabel(QString::number(val, 'f', 2) + "°");
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void InfiniteCableTogglesPanel::expandToggleDescription(const QString ¶m) {
|
||||
|
||||
Reference in New Issue
Block a user