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

small fixes
pull/34513/head
Dean Lee 3 months ago committed by GitHub
parent a5dd2ab2aa
commit 2b19b8f3d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      selfdrive/ui/qt/offroad/developer_panel.cc
  2. 2
      selfdrive/ui/qt/offroad/developer_panel.h

@ -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;
}

@ -15,7 +15,7 @@ private:
ParamControl* longManeuverToggle;
ParamControl* experimentalLongitudinalToggle;
bool is_release;
bool offroad;
bool offroad = false;
private slots:
void updateToggles(bool _offroad);

Loading…
Cancel
Save