This commit is contained in:
Your Name
2024-04-27 13:43:16 -05:00
parent 21363ce751
commit ea1aad5ed1
128 changed files with 3533 additions and 1918 deletions

6
selfdrive/ui/qt/widgets/drive_stats.h Executable file → Normal file
View File

@@ -3,6 +3,8 @@
#include <QJsonDocument>
#include <QLabel>
#include "common/params.h"
class DriveStats : public QFrame {
Q_OBJECT
@@ -15,10 +17,12 @@ private:
inline QString getDistanceUnit() const { return metric_ ? tr("KM") : tr("Miles"); }
bool metric_;
Params params;
Params paramsStorage{"/persist/params"};
QJsonDocument stats_;
struct StatsLabels {
QLabel *routes, *distance, *distance_unit, *hours;
} all_, week_;
} all_, week_, frogPilot_;
private slots:
void parseResponse(const QString &response, bool success);