Higher bitrate uploads

Added toggle to increase the bitrate for uploads to comma connect
This commit is contained in:
FrogAi 2024-02-05 12:33:48 -07:00
parent 521e1cd392
commit 29d312c0c9
4 changed files with 5 additions and 3 deletions

View File

@ -270,6 +270,7 @@ std::unordered_map<std::string, uint32_t> keys = {
{"GreenLightAlert", PERSISTENT}, {"GreenLightAlert", PERSISTENT},
{"HideSpeed", PERSISTENT}, {"HideSpeed", PERSISTENT},
{"HideSpeedUI", PERSISTENT}, {"HideSpeedUI", PERSISTENT},
{"HigherBitrate", PERSISTENT},
{"LaneLinesWidth", PERSISTENT}, {"LaneLinesWidth", PERSISTENT},
{"LateralTune", PERSISTENT}, {"LateralTune", PERSISTENT},
{"LeadInfo", PERSISTENT}, {"LeadInfo", PERSISTENT},

View File

@ -28,6 +28,7 @@ FrogPilotControlsPanel::FrogPilotControlsPanel(SettingsWindow *parent) : FrogPil
{"QOLControls", "Quality of Life", "Miscellaneous quality of life changes to improve your overall openpilot experience.", "../frogpilot/assets/toggle_icons/quality_of_life.png"}, {"QOLControls", "Quality of Life", "Miscellaneous quality of life changes to improve your overall openpilot experience.", "../frogpilot/assets/toggle_icons/quality_of_life.png"},
{"DisableOnroadUploads", "Disable Onroad Uploads", "Prevent large data uploads when onroad.", ""}, {"DisableOnroadUploads", "Disable Onroad Uploads", "Prevent large data uploads when onroad.", ""},
{"HigherBitrate", "Higher Bitrate Recording", "Increases the quality of the footage uploaded to comma connect.", ""},
}; };
for (const auto &[param, title, desc, icon] : controlToggles) { for (const auto &[param, title, desc, icon] : controlToggles) {
@ -227,7 +228,7 @@ FrogPilotControlsPanel::FrogPilotControlsPanel(SettingsWindow *parent) : FrogPil
}); });
} }
std::set<std::string> rebootKeys = {"AlwaysOnLateral"}; std::set<std::string> rebootKeys = {"AlwaysOnLateral", "HigherBitrate"};
for (const std::string &key : rebootKeys) { for (const std::string &key : rebootKeys) {
QObject::connect(toggles[key], &ToggleControl::toggleFlipped, [this, key]() { QObject::connect(toggles[key], &ToggleControl::toggleFlipped, [this, key]() {
if (started) { if (started) {

View File

@ -37,7 +37,7 @@ private:
std::set<QString> lateralTuneKeys = {"ForceAutoTune"}; std::set<QString> lateralTuneKeys = {"ForceAutoTune"};
std::set<QString> longitudinalTuneKeys = {"AccelerationProfile", "AggressiveAcceleration"}; std::set<QString> longitudinalTuneKeys = {"AccelerationProfile", "AggressiveAcceleration"};
std::set<QString> mtscKeys = {}; std::set<QString> mtscKeys = {};
std::set<QString> qolKeys = {"DisableOnroadUploads"}; std::set<QString> qolKeys = {"DisableOnroadUploads", "HigherBitrate"};
std::set<QString> speedLimitControllerKeys = {}; std::set<QString> speedLimitControllerKeys = {};
std::set<QString> visionTurnControlKeys = {}; std::set<QString> visionTurnControlKeys = {};

View File

@ -14,7 +14,7 @@
#include "system/loggerd/logger.h" #include "system/loggerd/logger.h"
constexpr int MAIN_FPS = 20; constexpr int MAIN_FPS = 20;
const int MAIN_BITRATE = 1e7; const int MAIN_BITRATE = Params().getBool("HigherBitrate") ? 20000000 : 1e7;
const int LIVESTREAM_BITRATE = 1e6; const int LIVESTREAM_BITRATE = 1e6;
const int QCAM_BITRATE = 256000; const int QCAM_BITRATE = 256000;