summaryrefslogtreecommitdiff
path: root/sensors.h
diff options
context:
space:
mode:
authordodoradio <dodoradio@github.com>2022-10-02 02:15:30 +0100
committerArseniy-Movshev <dodoradio@outlook.com>2022-11-05 20:03:44 +0000
commit287b52dd0e339574e11b05a5f6cbcf99e4d1dc93 (patch)
treec38655e45d3b09e11b4304e0573bfa163377956e /sensors.h
Initial commit
Diffstat (limited to '')
-rw-r--r--sensors.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/sensors.h b/sensors.h
new file mode 100644
index 0000000..1b57636
--- /dev/null
+++ b/sensors.h
@@ -0,0 +1,32 @@
+#ifndef LOGGER_H
+#define LOGGER_H
+
+#include <QObject>
+#include <QDateTime>
+#include <QDBusInterface>
+#include <QTimer>
+
+class Logger : public QObject
+{
+ Q_OBJECT
+public:
+ explicit Logger(QObject *parent = 0);
+ virtual ~Logger() {};
+private slots:
+ void displayOn(QString displayState);
+ void recordHeartrate();
+ void recordGPS();
+ void recordStepcounter();
+private:
+ QDateTime hrmLastTime;
+ QDateTime stepsLastTime;
+ QDBusInterface *m_iface;
+ int hrmInterval;
+ int gpsInterval;
+ int stepsInterval;
+ QTimer *hrmTimer;
+ QTimer *gpsTimer;
+ QTimer *stepsTimer;
+};
+
+#endif // LOGGER_H