This commit is contained in:
Your Name
2024-02-16 19:04:40 -06:00
parent eefd31d5b5
commit 189f0da0dc
3 changed files with 591 additions and 61 deletions

View File

@@ -35,12 +35,12 @@
TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
// param, title, desc, icon
std::vector<std::tuple<QString, QString, QString, QString>> toggle_defs{
// {
// "OpenpilotEnabledToggle",
// tr("Enable openpilot"),
// tr("Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off."),
// "../assets/offroad/icon_openpilot.png",
// },
{
"OpenpilotEnabledToggle",
tr("Enable openpilot"),
tr("Use the openpilot system for adaptive cruise control and lane keep driver assistance. Your attention is required at all times to use this feature. Changing this setting takes effect when the car is powered off."),
"../assets/offroad/icon_openpilot.png",
},
{
"ExperimentalLongitudinalEnabled",
tr("openpilot Longitudinal Control (Alpha)"),
@@ -50,30 +50,30 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
"Enable this to switch to openpilot longitudinal control. Enabling Experimental mode is recommended when enabling openpilot longitudinal control alpha.")),
"../assets/offroad/icon_speed_limit.png",
},
// {
// "ExperimentalMode",
// tr("Experimental Mode"),
// "",
// "../assets/img_experimental_white.svg",
// },
// {
// "DisengageOnAccelerator",
// tr("Disengage on Accelerator Pedal"),
// tr("When enabled, pressing the accelerator pedal will disengage openpilot."),
// "../assets/offroad/icon_disengage_on_accelerator.svg",
// },
{
"ExperimentalMode",
tr("Experimental Mode"),
"",
"../assets/img_experimental_white.svg",
},
{
"DisengageOnAccelerator",
tr("Disengage on Accelerator Pedal"),
tr("When enabled, pressing the accelerator pedal will disengage openpilot."),
"../assets/offroad/icon_disengage_on_accelerator.svg",
},
{
"IsLdwEnabled",
tr("Enable Lane Departure Warnings"),
tr("Receive alerts to steer back into the lane when your vehicle drifts over a detected lane line without a turn signal activated while driving over 31 mph (50 km/h)."),
"../assets/offroad/icon_warning.png",
},
// {
// "RecordFront",
// tr("Record and Upload Driver Camera"),
// tr("Upload data from the driver facing camera and help improve the driver monitoring algorithm."),
// "../assets/offroad/icon_monitoring.png",
// },
{
"RecordFront",
tr("Record and Upload Driver Camera"),
tr("Upload data from the driver facing camera and help improve the driver monitoring algorithm."),
"../assets/offroad/icon_monitoring.png",
},
{
"IsMetric",
tr("Use Metric System"),
@@ -98,11 +98,11 @@ TogglesPanel::TogglesPanel(SettingsWindow *parent) : ListWidget(parent) {
std::vector<QString> longi_button_texts{tr("Aggressive"), tr("Standard"), tr("Relaxed")};
// long_personality_setting = new ButtonParamControl("LongitudinalPersonality", tr("Driving Personality"),
// tr("Standard is recommended. In aggressive mode, openpilot will follow lead cars closer and be more aggressive with the gas and brake. "
// "In relaxed mode openpilot will stay further away from lead cars."),
// "../assets/offroad/icon_speed_limit.png",
// longi_button_texts);
long_personality_setting = new ButtonParamControl("LongitudinalPersonality", tr("Driving Personality"),
tr("Standard is recommended. In aggressive mode, openpilot will follow lead cars closer and be more aggressive with the gas and brake. "
"In relaxed mode openpilot will stay further away from lead cars."),
"../assets/offroad/icon_speed_limit.png",
longi_button_texts);
for (auto &[param, title, desc, icon] : toggle_defs) {
auto toggle = new ParamControl(param, title, desc, icon, this);