Navigate on openpilot without a comma prime subscription

Added functionality to use navigate on openpilot without a comma prime subscription with a custom set MapBox key.

Credit goes to DragonPilot!

https: //github.com/dragonpilot-community
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent ae99774cf3
commit 7c2814329d
15 changed files with 297 additions and 5 deletions

View File

@@ -62,7 +62,13 @@ MapSettings::MapSettings(bool closeable, QWidget *parent) : QFrame(parent) {
title->setStyleSheet("color: #FFFFFF; font-size: 54px; font-weight: 600;");
heading->addWidget(title);
auto *subtitle = new QLabel(tr("Manage at connect.comma.ai"), this);
// 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->setStyleSheet("color: #A0A0A0; font-size: 40px; font-weight: 300;");
heading->addWidget(subtitle);
}
@@ -138,6 +144,12 @@ void MapSettings::refresh() {
for (; n < widgets.size(); ++n) widgets[n]->setVisible(false);
setUpdatesEnabled(true);
// NOO without Prime IP update
if (notPrime) {
ipAddress = QString("%1:8082").arg(wifi->getIp4Address());
subtitle->setText(tr("Manage at %1").arg(ipAddress));
}
}
void MapSettings::navigateTo(const QJsonObject &place) {