mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-08-05 08:15:58 +08:00
107 lines
2.5 KiB
C++
107 lines
2.5 KiB
C++
#pragma once
|
|
|
|
#include "selfdrive/ui/qt/offroad/settings.h"
|
|
#include "selfdrive/ui/qt/widgets/scrollview.h"
|
|
|
|
#include "starpilot/ui/starpilot_ui.h"
|
|
#include "starpilot/ui/qt/widgets/starpilot_controls.h"
|
|
|
|
class QNetworkAccessManager;
|
|
|
|
class StarPilotSettingsWindow : public QFrame {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit StarPilotSettingsWindow(SettingsWindow *parent);
|
|
|
|
void updateVariables();
|
|
bool showAllTogglesEnabled();
|
|
|
|
bool canUsePedal = false;
|
|
bool canUseSDSU = false;
|
|
bool forceOpenDescriptions = false;
|
|
bool hasAlphaLongitudinal = false;
|
|
bool hasAutoTune = true;
|
|
bool hasBSM = true;
|
|
bool hasDashSpeedLimits = true;
|
|
bool hasNNFFLog = true;
|
|
bool hasOpenpilotLongitudinal = true;
|
|
bool hasPCMCruise = false;
|
|
bool hasPedal = false;
|
|
bool hasRadar = true;
|
|
bool hasSDSU = false;
|
|
bool hasSNG = false;
|
|
bool hasModeStarButtons = false;
|
|
bool hasZSS = false;
|
|
bool isAngleCar = false;
|
|
bool isBolt = false;
|
|
bool isFrogsGoMoo = false;
|
|
bool isGM = true;
|
|
bool isHKG = true;
|
|
bool isHKGCanFd = true;
|
|
bool isJeep = false;
|
|
bool isSubaru = false;
|
|
bool isTorqueCar = false;
|
|
bool isToyota = true;
|
|
bool isTSK = false;
|
|
bool isVolt = true;
|
|
bool keepScreenOn = false;
|
|
bool lkasAllowedForAOL = false;
|
|
bool openpilotLongitudinalControlDisabled = false;
|
|
|
|
float friction;
|
|
float latAccelFactor;
|
|
float longitudinalActuatorDelay;
|
|
float startAccel;
|
|
float steerActuatorDelay;
|
|
float steerKp;
|
|
float steerRatio;
|
|
float stopAccel;
|
|
float stoppingDecelRate;
|
|
float vEgoStarting;
|
|
float vEgoStopping;
|
|
|
|
int tuningLevel;
|
|
|
|
QJsonObject starpilotToggleLevels;
|
|
|
|
signals:
|
|
void closeSubPanel();
|
|
void closeSubSubPanel();
|
|
void closeSubSubSubPanel();
|
|
void openPanel();
|
|
void openSubPanel();
|
|
void openSubSubPanel();
|
|
void openSubSubSubPanel();
|
|
void tuningLevelChanged(int level);
|
|
void updateMetric(bool metric, bool bootRun=false);
|
|
|
|
private:
|
|
void closePanel();
|
|
void createPanelButtons(StarPilotListWidget *list);
|
|
void hideEvent(QHideEvent *event) override;
|
|
void showEvent(QShowEvent *event) override;
|
|
void updateState();
|
|
void updateTuningLevel();
|
|
|
|
bool panelOpen;
|
|
|
|
std::string carMake;
|
|
|
|
StarPilotButtonsControl *drivingPanelButtons;
|
|
StarPilotButtonsControl *navigationPanelButtons;
|
|
StarPilotButtonsControl *soundPanelButtons;
|
|
StarPilotButtonsControl *systemPanelButtons;
|
|
StarPilotButtonsControl *themePanelButtons;
|
|
StarPilotButtonsControl *togglePreset;
|
|
StarPilotButtonsControl *vehiclePanelButtons;
|
|
|
|
Params params;
|
|
|
|
QJsonObject shownDescriptions;
|
|
|
|
QStackedLayout *mainLayout;
|
|
|
|
ScrollView *starpilotPanel;
|
|
};
|