Switch personalities via steering wheel / onroad UI
Added toggle to switch between the personalities via the steering wheel or an onroad UI button. Co-Authored-By: henryccy <104284652+henryccy@users.noreply.github.com> Co-Authored-By: Jason Jackrel <23621790+thinkpad4by3@users.noreply.github.com> Co-Authored-By: Eric Brown <13560103+nworb-cire@users.noreply.github.com> Co-Authored-By: Kevin Robert Keegan <3046315+krkeegan@users.noreply.github.com> Co-Authored-By: Jacob Pfeifer <jacob@pfeifer.dev> Co-Authored-By: mike8643 <98910897+mike8643@users.noreply.github.com>
This commit is contained in:
@@ -120,6 +120,29 @@ private:
|
||||
float acceleration;
|
||||
};
|
||||
|
||||
class PersonalityButton : public QPushButton {
|
||||
public:
|
||||
explicit PersonalityButton(QWidget *parent = 0);
|
||||
|
||||
void checkUpdate();
|
||||
void handleClick();
|
||||
void updateState();
|
||||
|
||||
private:
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
|
||||
Params params;
|
||||
Params paramsMemory{"/dev/shm/params"};
|
||||
|
||||
UIScene &scene;
|
||||
|
||||
int personalityProfile = 0;
|
||||
|
||||
QElapsedTimer transitionTimer;
|
||||
|
||||
QVector<std::pair<QPixmap, QString>> profile_data;
|
||||
};
|
||||
|
||||
// container window for the NVG UI
|
||||
class AnnotatedCameraWidget : public CameraWidget {
|
||||
Q_OBJECT
|
||||
@@ -172,6 +195,7 @@ private:
|
||||
|
||||
Compass *compass_img;
|
||||
PedalIcons *pedal_icons;
|
||||
PersonalityButton *personality_btn;
|
||||
ScreenRecorder *recorder_btn;
|
||||
|
||||
QHBoxLayout *bottom_layout;
|
||||
@@ -186,6 +210,7 @@ private:
|
||||
bool fullMapOpen;
|
||||
bool leadInfo;
|
||||
bool mapOpen;
|
||||
bool onroadAdjustableProfiles;
|
||||
bool pedalsOnUI;
|
||||
bool rightHandDrive;
|
||||
bool roadNameUI;
|
||||
|
||||
Reference in New Issue
Block a user