house keeping

This commit is contained in:
Jason Wen
2025-01-04 01:45:57 -05:00
parent 06f0133006
commit fcdf540a97
2 changed files with 8 additions and 4 deletions
@@ -20,6 +20,7 @@ MadsSettings::MadsSettings(QWidget *parent) : QWidget(parent) {
main_layout->addWidget(back, 0, Qt::AlignLeft);
ListWidget *list = new ListWidget(this, false);
// Main cruise
madsMainCruiseToggle = new ParamControl(
"MadsMainCruiseAllowed",
tr("Toggle with Main Cruise"),
@@ -27,6 +28,7 @@ MadsSettings::MadsSettings(QWidget *parent) : QWidget(parent) {
"");
list->addItem(madsMainCruiseToggle);
// Unified Engagement Mode
madsUnifiedEngagementModeToggle = new ParamControl(
"MadsUnifiedEngagementMode",
tr("Unified Engagement Mode (UEM)"),
@@ -37,6 +39,7 @@ MadsSettings::MadsSettings(QWidget *parent) : QWidget(parent) {
"");
list->addItem(madsUnifiedEngagementModeToggle);
// Pause Lateral On Brake
std::vector<QString> lateral_on_brake_texts{tr("Remain Active"), tr("Pause Steering")};
madsPauseLateralOnBrake = new ButtonParamControl(
"MadsPauseLateralOnBrake",
@@ -18,6 +18,7 @@ SunnypilotPanel::SunnypilotPanel(SettingsWindowSP *parent) : QFrame(parent) {
QVBoxLayout* vlayout = new QVBoxLayout(sunnypilotScreen);
vlayout->setContentsMargins(50, 20, 50, 20);
// MADS
madsToggle = new ParamControl(
"Mads",
tr("Modular Assistive Driving System (MADS)"),
@@ -25,12 +26,12 @@ SunnypilotPanel::SunnypilotPanel(SettingsWindowSP *parent) : QFrame(parent) {
"");
list->addItem(madsToggle);
SubPanelButton *madsSettings = new SubPanelButton(tr("Customize MADS"));
madsSettings->setObjectName("mads_btn");
SubPanelButton *madsSettingsButton = new SubPanelButton(tr("Customize MADS"));
madsSettingsButton->setObjectName("mads_btn");
QVBoxLayout* madsSettingsLayout = new QVBoxLayout;
madsSettingsLayout->setContentsMargins(0, 0, 0, 30);
madsSettingsLayout->addWidget(madsSettings);
connect(madsSettings, &QPushButton::clicked, [=]() {
madsSettingsLayout->addWidget(madsSettingsButton);
connect(madsSettingsButton, &QPushButton::clicked, [=]() {
scrollView->setLastScrollPosition();
main_layout->setCurrentWidget(mads_settings);
});