This commit is contained in:
Your Name
2024-04-27 13:43:16 -05:00
parent 21363ce751
commit ea1aad5ed1
128 changed files with 3533 additions and 1918 deletions

16
selfdrive/ui/qt/maps/map_settings.cc Executable file → Normal file
View File

@@ -62,13 +62,7 @@ MapSettings::MapSettings(bool closeable, QWidget *parent) : QFrame(parent) {
title->setStyleSheet("color: #FFFFFF; font-size: 54px; font-weight: 600;");
heading->addWidget(title);
// NOO without Prime IP extraction
if (notPrime) {
ipAddress = QString("%1:8082").arg(wifi->getIp4Address());
subtitle = new QLabel(tr("Manage at %1").arg(ipAddress), this);
} else {
subtitle = new QLabel(tr("Manage at connect.comma.ai"), this);
}
subtitle = new QLabel(tr("Manage at connect.comma.ai"), this);
subtitle->setStyleSheet("color: #A0A0A0; font-size: 40px; font-weight: 300;");
heading->addWidget(subtitle);
}
@@ -99,6 +93,8 @@ MapSettings::MapSettings(bool closeable, QWidget *parent) : QFrame(parent) {
setStyleSheet("MapSettings { background-color: #333333; }");
QObject::connect(NavManager::instance(), &NavManager::updated, this, &MapSettings::refresh);
wifi = new WifiManager(this);
}
void MapSettings::showEvent(QShowEvent *event) {
@@ -145,9 +141,9 @@ void MapSettings::refresh() {
setUpdatesEnabled(true);
// NOO without Prime IP update
if (notPrime) {
ipAddress = QString("%1:8082").arg(wifi->getIp4Address());
// Use IP for NOO without Prime
if (!uiState()->hasPrime()) {
QString ipAddress = QString("%1:8082").arg(wifi->getIp4Address());
subtitle->setText(tr("Manage at %1").arg(ipAddress));
}
}