mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-20 18:03:46 +08:00
0c141e45aa
* kind of works now
* QR code is now on screen
* testing is needed
* works, waiting for server update
* reduce diff
* refactoring part1
* refactor part2
* refactor part3
* works on PC
* fix build, annoying bug though...
* git is annoying
* more classes, still crashes after a while
* better style
* clearer qr code
* less code and test new ssh key
* no more AA
* rename and collect garbage
* no pairing widget without the internet connection
* No network connection
* more logs
* refactor the network calls
* no more leaking
* works
* cleanup
* spaces
* works on device
* fix merge
* don't run if screen is off
* always initialized
* stats updating, not running without scrren
* formatting
* nicer QR code
* ensure the registration
* no qr code if no IMEI or no HWSerial
* all works
* refactor
* better networking
* all functionality seems to work
* small cleanup
* get serial once
* Small cleanup
* No internet text
* Don't crash if private key not found
* no network should say so
* new qr code every 30 minutes
* 20FPS sidebar
* more responsive networking and QR
* more logs
* no log spam
* fix merge
* no running onroad
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 10bd761cd6
61 lines
1003 B
C++
61 lines
1003 B
C++
#pragma once
|
|
|
|
#include <QLabel>
|
|
#include <QNetworkReply>
|
|
#include <QStackedLayout>
|
|
#include <QWidget>
|
|
|
|
#include "api.hpp"
|
|
|
|
class PairingQRWidget : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit PairingQRWidget(QWidget* parent = 0);
|
|
|
|
private:
|
|
QLabel* qrCode;
|
|
void updateQrCode(QString text);
|
|
|
|
private slots:
|
|
void refresh();
|
|
};
|
|
|
|
class PrimeUserWidget : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit PrimeUserWidget(QWidget* parent = 0);
|
|
|
|
private:
|
|
QVBoxLayout* mainLayout;
|
|
QLabel* username;
|
|
QLabel* points;
|
|
CommaApi* api;
|
|
|
|
private slots:
|
|
void replyFinished(QString response);
|
|
};
|
|
|
|
class PrimeAdWidget : public QWidget {
|
|
Q_OBJECT
|
|
public:
|
|
explicit PrimeAdWidget(QWidget* parent = 0);
|
|
};
|
|
|
|
class SetupWidget : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit SetupWidget(QWidget* parent = 0);
|
|
|
|
private:
|
|
QStackedLayout* mainLayout;
|
|
CommaApi* api;
|
|
bool showQr = false;
|
|
|
|
private slots:
|
|
void parseError(QString response);
|
|
void replyFinished(QString response);
|
|
void showQrCode();
|
|
};
|