mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-09 01:23:43 +08:00
Controls - Device Management - Disable Uploads
Turn off all data uploads to comma's servers.
This commit is contained in:
@@ -153,7 +153,7 @@ void TogglesPanel::updateToggles() {
|
||||
auto disengage_on_accelerator_toggle = toggles["DisengageOnAccelerator"];
|
||||
disengage_on_accelerator_toggle->setVisible(!params.getBool("AlwaysOnLateral"));
|
||||
auto driver_camera_toggle = toggles["RecordFront"];
|
||||
driver_camera_toggle->setVisible(!(params.getBool("DeviceManagement") && params.getBool("NoLogging")));
|
||||
driver_camera_toggle->setVisible(!(params.getBool("DeviceManagement") && params.getBool("NoLogging") && params.getBool("NoUploads")));
|
||||
|
||||
auto experimental_mode_toggle = toggles["ExperimentalMode"];
|
||||
auto op_long_toggle = toggles["ExperimentalLongitudinalEnabled"];
|
||||
|
||||
@@ -81,6 +81,34 @@ WiFiPromptWidget::WiFiPromptWidget(QWidget *parent) : QFrame(parent) {
|
||||
}
|
||||
stack->addWidget(uploading);
|
||||
|
||||
QWidget *notUploading = new QWidget;
|
||||
QVBoxLayout *not_uploading_layout = new QVBoxLayout(notUploading);
|
||||
not_uploading_layout->setContentsMargins(64, 56, 64, 56);
|
||||
not_uploading_layout->setSpacing(36);
|
||||
{
|
||||
QHBoxLayout *title_layout = new QHBoxLayout;
|
||||
{
|
||||
QLabel *title = new QLabel(tr("Uploading disabled"));
|
||||
title->setStyleSheet("font-size: 64px; font-weight: 600;");
|
||||
title->setWordWrap(true);
|
||||
title->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||
title_layout->addWidget(title);
|
||||
title_layout->addStretch();
|
||||
|
||||
QLabel *icon = new QLabel;
|
||||
QPixmap pixmap("../frogpilot/assets/other_images/icon_wifi_uploading_disabled.svg");
|
||||
icon->setPixmap(pixmap.scaledToWidth(120, Qt::SmoothTransformation));
|
||||
title_layout->addWidget(icon);
|
||||
}
|
||||
not_uploading_layout->addLayout(title_layout);
|
||||
|
||||
QLabel *desc = new QLabel(tr("Toggle off the 'Disable Uploading' toggle to enable uploads."));
|
||||
desc->setStyleSheet("font-size: 48px; font-weight: 400;");
|
||||
desc->setWordWrap(true);
|
||||
not_uploading_layout->addWidget(desc);
|
||||
}
|
||||
stack->addWidget(notUploading);
|
||||
|
||||
setStyleSheet(R"(
|
||||
WiFiPromptWidget {
|
||||
background-color: #333333;
|
||||
@@ -99,5 +127,6 @@ void WiFiPromptWidget::updateState(const UIState &s) {
|
||||
auto network_type = sm["deviceState"].getDeviceState().getNetworkType();
|
||||
auto uploading = network_type == cereal::DeviceState::NetworkType::WIFI ||
|
||||
network_type == cereal::DeviceState::NetworkType::ETHERNET;
|
||||
stack->setCurrentIndex(uploading ? 1 : 0);
|
||||
bool uploading_disabled = params.getBool("DeviceManagement") && params.getBool("NoUploads");
|
||||
stack->setCurrentIndex(uploading_disabled ? 2 : uploading ? 1 : 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user