diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control.h b/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control.h index 159d48f269..bab8f17c8c 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control.h +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control.h @@ -8,20 +8,9 @@ #pragma once #include "selfdrive/ui/sunnypilot/ui.h" -#include "selfdrive/ui/sunnypilot/qt/offroad/settings/settings.h" #include "selfdrive/ui/sunnypilot/qt/widgets/controls.h" #include "selfdrive/ui/sunnypilot/qt/widgets/expandable_row.h" -enum class SLCEngageType { - AUTO, - USER_CONFIRM, -}; - -inline const char *SLCEngageTypeText[]{ - QT_TR_NOOP("Auto"), - QT_TR_NOOP("User Confirm") -}; - enum class SLCOffsetType { NONE, FIXED, diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control_subpanel.cc b/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control_subpanel.cc index 374daf0988..8632a68df4 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control_subpanel.cc +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control_subpanel.cc @@ -44,20 +44,6 @@ SpeedLimitControlSubpanel::SpeedLimitControlSubpanel(QWidget *parent) : QStacked slcBtnFrameLayout->addWidget(slcSourceControl, 0, 0, Qt::AlignLeft); list->addItem(slcBtnFrame); - std::vector slc_engage_texts{ - SLCEngageTypeText[static_cast(SLCEngageType::AUTO)], - SLCEngageTypeText[static_cast(SLCEngageType::USER_CONFIRM)] - }; - slc_engage_setting = new ButtonParamControlSP( - "SpeedLimitEngageType", - tr("Engage Mode"), - "", - "", - slc_engage_texts, - 500); - slc_engage_setting->showDescription(); - list->addItem(slc_engage_setting); - QFrame *offsetFrame = new QFrame(this); QVBoxLayout *offsetLayout = new QVBoxLayout(offsetFrame); @@ -89,7 +75,6 @@ SpeedLimitControlSubpanel::SpeedLimitControlSubpanel(QWidget *parent) : QStacked connect(slc_offset, &OptionControlSP::updateLabels, this, &SpeedLimitControlSubpanel::refresh); connect(slc_offset_setting, &ButtonParamControlSP::showDescriptionEvent, slc_offset, &OptionControlSP::showDescription); - connect(slc_engage_setting, &ButtonParamControlSP::buttonClicked, this, &SpeedLimitControlSubpanel::refresh); connect(slc_offset_setting, &ButtonParamControlSP::buttonClicked, this, &SpeedLimitControlSubpanel::refresh); refresh(); @@ -100,11 +85,9 @@ SpeedLimitControlSubpanel::SpeedLimitControlSubpanel(QWidget *parent) : QStacked }; void SpeedLimitControlSubpanel::refresh() { - SLCEngageType engage_type_param = static_cast(std::atoi(params.get("SpeedLimitEngageType").c_str())); SLCOffsetType offset_type_param = static_cast(std::atoi(params.get("SpeedLimitOffsetType").c_str())); QString offsetLabel = QString::fromStdString(params.get("SpeedLimitValueOffset")); - slc_engage_setting->setDescription(engageModeDescription(engage_type_param)); slc_offset->setDescription(offsetDescription(offset_type_param)); if (offset_type_param == SLCOffsetType::PERCENT) { @@ -122,6 +105,5 @@ void SpeedLimitControlSubpanel::refresh() { void SpeedLimitControlSubpanel::showEvent(QShowEvent *event) { refresh(); - slc_engage_setting->showDescription(); slc_offset->showDescription(); } diff --git a/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control_subpanel.h b/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control_subpanel.h index cbf0cf2571..f24d4b1925 100644 --- a/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control_subpanel.h +++ b/selfdrive/ui/sunnypilot/qt/offroad/settings/longitudinal/slc/speed_limit_control_subpanel.h @@ -30,24 +30,8 @@ private: PushButtonSP *slcSourceControl; ButtonParamControlSP *slc_offset_setting; OptionControlSP *slc_offset; - ButtonParamControlSP *slc_engage_setting; SpeedLimitControlPolicy *slcPolicyScreen; - static QString engageModeDescription(SLCEngageType type = SLCEngageType::AUTO) { - QString auto_str = tr("⦿ Auto: Automatic speed adjustment based on speed limit data"); - QString user_str = tr("⦿ User Confirm: Asks driver to confirm speed adjustment based on speed limit data"); - - if (type == SLCEngageType::USER_CONFIRM) { - user_str = "" + user_str + ""; - } else { - auto_str = "" + auto_str + ""; - } - - return QString("%1
%2") - .arg(auto_str) - .arg(user_str); - } - static QString offsetDescription(SLCOffsetType type = SLCOffsetType::NONE) { QString none_str = tr("⦿ None: No Offset"); QString fixed_str = tr("⦿ Fixed: Adds a fixed offset [Speed Limit + Offset]");