FPS counter

Added toggle to enable an fps counter for the onroad UI and the current displayed camera.
This commit is contained in:
FrogAi
2024-02-27 16:34:47 -07:00
parent 4045564927
commit 9f12f67d06
8 changed files with 84 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ const int btn_size = 192;
const int img_size = (btn_size / 4) * 3;
// FrogPilot global variables
static double fps;
// ***** onroad widgets *****
class OnroadAlerts : public QWidget {
@@ -197,10 +198,17 @@ private:
QWidget *map = nullptr;
QHBoxLayout* split;
// FrogPilot widgets
void updateFPSCounter();
// FrogPilot variables
UIScene &scene;
Params paramsMemory{"/dev/shm/params"};
double avgFPS;
double maxFPS = 0.0;
double minFPS = 99.9;
QPoint timeoutPoint = QPoint(420, 69);
QTimer clickTimer;