From f6335f1f7b833459875a2e0322f05972712342ee Mon Sep 17 00:00:00 2001 From: Jason Wen Date: Sat, 10 Jun 2023 22:04:38 -0400 Subject: [PATCH] ui: display current driving model in software settings (#127) --- common/model.h | 1 + release/files_common | 1 + selfdrive/ui/qt/offroad/settings.h | 1 + selfdrive/ui/qt/offroad/software_settings.cc | 4 ++++ 4 files changed, 7 insertions(+) create mode 100644 common/model.h diff --git a/common/model.h b/common/model.h new file mode 100644 index 0000000000..18eb3f27b0 --- /dev/null +++ b/common/model.h @@ -0,0 +1 @@ +#define CURRENT_MODEL "Nicki Minaj (May 22, 2023)" diff --git a/release/files_common b/release/files_common index 66303dd58a..b2055b8386 100644 --- a/release/files_common +++ b/release/files_common @@ -162,6 +162,7 @@ selfdrive/mapd/README.md common/SConscript common/version.h +common/model.h common/prefix.h common/swaglog.h diff --git a/selfdrive/ui/qt/offroad/settings.h b/selfdrive/ui/qt/offroad/settings.h index a7c1dfff02..91890e3da4 100644 --- a/selfdrive/ui/qt/offroad/settings.h +++ b/selfdrive/ui/qt/offroad/settings.h @@ -89,6 +89,7 @@ private: QLabel *onroadLbl; QLabel *osmUpdateLbl; + LabelControl *currentModelLbl; LabelControl *versionLbl; ButtonControl *installBtn; ButtonControl *downloadBtn; diff --git a/selfdrive/ui/qt/offroad/software_settings.cc b/selfdrive/ui/qt/offroad/software_settings.cc index 7257ca5c55..e750cbfec0 100644 --- a/selfdrive/ui/qt/offroad/software_settings.cc +++ b/selfdrive/ui/qt/offroad/software_settings.cc @@ -9,6 +9,7 @@ #include "common/params.h" #include "common/util.h" +#include "common/model.h" #include "selfdrive/ui/ui.h" #include "selfdrive/ui/qt/util.h" #include "selfdrive/ui/qt/widgets/controls.h" @@ -21,6 +22,9 @@ void SoftwarePanel::checkForUpdates() { } SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent) { + currentModelLbl = new LabelControl(tr("Current Driving Model"), CURRENT_MODEL); + addItem(currentModelLbl); + onroadLbl = new QLabel(tr("Updates are only downloaded while the car is off.")); onroadLbl->setStyleSheet("font-size: 50px; font-weight: 400; text-align: left; padding-top: 30px; padding-bottom: 30px;"); addItem(onroadLbl);