ui/DeveloperPanel: initialize offroad state, refresh toggle, and cleanup Includes (#34510)

small fixes
This commit is contained in:
Dean Lee
2025-01-31 14:56:14 +08:00
committed by GitHub
parent a5dd2ab2aa
commit 2b19b8f3d7
2 changed files with 2 additions and 5 deletions
+1 -4
View File
@@ -1,10 +1,6 @@
#include <QDebug>
#include <QProcess>
#include "selfdrive/ui/qt/offroad/developer_panel.h"
#include "selfdrive/ui/qt/widgets/ssh_keys.h"
#include "selfdrive/ui/qt/widgets/controls.h"
#include "common/util.h"
DeveloperPanel::DeveloperPanel(SettingsWindow *parent) : ListWidget(parent) {
adbToggle = new ParamControl("AdbEnabled", tr("Enable ADB"),
@@ -89,6 +85,7 @@ void DeveloperPanel::updateToggles(bool _offroad) {
longManeuverToggle->setEnabled(false);
experimentalLongitudinalToggle->setVisible(false);
}
experimentalLongitudinalToggle->refresh();
offroad = _offroad;
}
+1 -1
View File
@@ -15,7 +15,7 @@ private:
ParamControl* longManeuverToggle;
ParamControl* experimentalLongitudinalToggle;
bool is_release;
bool offroad;
bool offroad = false;
private slots:
void updateToggles(bool _offroad);