Files
clearpilot/selfdrive/frogpilot/ui/vehicle_settings.h
FrogAi ae0f095915 Lock doors when in drive for Toyota/Lexus
Added toggle to automatically lock the doors when in drive for Toyota/Lexus vehicles.

Credit goes to AlexandreSato!

https: //github.com/AlexandreSato/openpilot
Co-Authored-By: Alexandre Nobuharu Sato <66435071+alexandresato@users.noreply.github.com>
2024-04-11 07:13:08 -07:00

40 lines
857 B
C++

#pragma once
#include <set>
#include <QStringList>
#include "selfdrive/frogpilot/ui/frogpilot_ui_functions.h"
#include "selfdrive/ui/qt/offroad/settings.h"
#include "selfdrive/ui/ui.h"
class FrogPilotVehiclesPanel : public FrogPilotListWidget {
Q_OBJECT
public:
explicit FrogPilotVehiclesPanel(SettingsWindow *parent);
private:
void setModels();
void setToggles();
void updateState(const UIState &s);
void updateToggles();
ButtonControl *selectMakeButton;
ButtonControl *selectModelButton;
QString carMake;
QStringList models;
std::map<std::string, ParamControl*> toggles;
std::set<QString> gmKeys = {"GasRegenCmd", "LongPitch"};
std::set<QString> subaruKeys = {};
std::set<QString> toyotaKeys = {"LockDoors", "LongitudinalTune"};
Params params;
Params paramsMemory{"/dev/shm/params"};
bool started = false;
};