Custom steering wheel icons

Added toggle for custom steering wheel icons in the onroad UI.

Want to add your own steering wheel? Request one under "feature-requests" on the FrogPilot Discord!
This commit is contained in:
FrogAi
2024-01-12 22:39:30 -07:00
parent 62e60535e6
commit 142e5e0975
12 changed files with 38 additions and 2 deletions

View File

@@ -20,6 +20,7 @@ FrogPilotVisualsPanel::FrogPilotVisualsPanel(SettingsWindow *parent) : FrogPilot
{"UnlimitedLength", "'Unlimited' Road UI Length", "Extend the display of the path, lane lines, and road edges as far as the system can detect, providing a more expansive view of the road ahead.", ""},
{"ScreenBrightness", "Screen Brightness", "Customize your screen brightness.", "../frogpilot/assets/toggle_icons/icon_light.png"},
{"WheelIcon", "Steering Wheel Icon", "Replace the default steering wheel icon with a custom design, adding a unique touch to your interface.", "../assets/offroad/icon_openpilot.png"},
};
for (const auto &[param, title, desc, icon] : visualToggles) {
@@ -67,6 +68,12 @@ FrogPilotVisualsPanel::FrogPilotVisualsPanel(SettingsWindow *parent) : FrogPilot
}
toggle = new FrogPilotParamValueControl(param, title, desc, icon, 0, 101, brightnessLabels, this, false);
} else if (param == "WheelIcon") {
std::vector<QString> wheelToggles{};
std::vector<QString> wheelToggleNames{};
std::map<int, QString> steeringWheelLabels = {{0, "Stock"}, {1, "Lexus"}, {2, "Toyota"}, {3, "Frog"}, {4, "Rocket"}, {5, "Hyundai"}, {6, "Stalin"}};
toggle = new FrogPilotParamValueToggleControl(param, title, desc, icon, 0, 6, steeringWheelLabels, this, true, "", 1, wheelToggles, wheelToggleNames);
} else {
toggle = new ParamControl(param, title, desc, icon, this);
}