wip
This commit is contained in:
@@ -2,8 +2,31 @@
|
|||||||
#include "selfdrive/ui/ui.h"
|
#include "selfdrive/ui/ui.h"
|
||||||
|
|
||||||
OscarPilotBasicPanel::OscarPilotBasicPanel(OscarSettingsWindow *parent) : FrogPilotListWidget(parent) {
|
OscarPilotBasicPanel::OscarPilotBasicPanel(OscarSettingsWindow *parent) : FrogPilotListWidget(parent) {
|
||||||
|
|
||||||
const std::vector<std::tuple<QString, QString, QString, QString>> visualToggles {
|
const std::vector<std::tuple<QString, QString, QString, QString>> visualToggles {
|
||||||
{"HelloWorld", "Hello World", "Hi!", "../frogpilot/assets/wheel_images/frog.png"},
|
// {"HelloWorld", "Hello World", "Hi!", "../frogpilot/assets/wheel_images/frog.png"},
|
||||||
|
{
|
||||||
|
"OpenpilotEnabledToggle","Enable OpenPilot",
|
||||||
|
"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",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"AlwaysOnLateral", "Always on Lateral",
|
||||||
|
"Maintain openpilot lateral control when the brake or gas pedals are used.\n\nDeactivation occurs only through the 'Cruise Control' button.", "../frogpilot/assets/toggle_icons/icon_always_on_lateral.png"
|
||||||
|
},
|
||||||
|
{"VisionTurnControl", "Vision Turn Speed Controller", "Slow down for detected road curvature for smoother curve handling.", "../frogpilot/assets/toggle_icons/icon_vtc.png"},
|
||||||
|
|
||||||
|
// {
|
||||||
|
// "ConditionalExperimental", "Slow for curves",
|
||||||
|
// "Engages 'experimental mode' when a curve is detected, temporairly reducing max speed.", "../frogpilot/assets/toggle_icons/icon_conditional.png"
|
||||||
|
// },
|
||||||
|
// Alert on stopsign / stoplight
|
||||||
|
|
||||||
|
{"FireTheBabysitter", "Custom Driver Monitoring", "Customize the driver awareness alert timeouts.", ""},
|
||||||
|
// - Hands On Wheel: Always / At Dusk / 2+ hrs driving
|
||||||
|
|
||||||
|
{"LaneChangeAssist", "Lane Change Assist", "Automatically change lanes on turn signal and wheel nudge at highway speeds.", "../frogpilot/assets/toggle_icons/icon_lane.png"},
|
||||||
|
{"DashCam", "Dash Cam Recording", "Record video and gps data for all drives automatically.", ""}
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto &[param, title, desc, icon] : visualToggles) {
|
for (const auto &[param, title, desc, icon] : visualToggles) {
|
||||||
|
|||||||
@@ -79,12 +79,14 @@ OscarSettingsWindow::OscarSettingsWindow(QWidget *parent) : QFrame(parent) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// QObject::connect(device, &DevicePanel::showDriverView, this, &SettingsWindow::showDriverView);
|
FrogPilotControlsPanel *frogpilotControls = new FrogPilotControlsPanel(this);
|
||||||
|
QObject::connect(frogpilotControls, &FrogPilotControlsPanel::closeParentToggle, this, [this]() {frogPilotTogglesOpen = false;});
|
||||||
|
QObject::connect(frogpilotControls, &FrogPilotControlsPanel::openParentToggle, this, [this]() {frogPilotTogglesOpen = true;});
|
||||||
|
|
||||||
QList<QPair<QString, QWidget *>> panels = {
|
QList<QPair<QString, QWidget *>> panels = {
|
||||||
{tr("Basic"), new OscarPilotBasicPanel(this)},
|
{tr("Basic"), new OscarPilotBasicPanel(this)},
|
||||||
{tr("Network"), new Networking(this)},
|
{tr("Network"), new Networking(this)},
|
||||||
// {tr("Advanced"), basic},
|
{tr("Advanced"), frogpilotControls},
|
||||||
// {tr("OscarCloud"), basic},
|
// {tr("OscarCloud"), basic},
|
||||||
// {tr("Logging"), basic}, // Log / Upload driver cam, Routes
|
// {tr("Logging"), basic}, // Log / Upload driver cam, Routes
|
||||||
// {tr("System"), new OscarPilotBasicPanel(this)}, // Debugging
|
// {tr("System"), new OscarPilotBasicPanel(this)}, // Debugging
|
||||||
|
|||||||
Reference in New Issue
Block a user