Added data logger (again)

This commit is contained in:
2019-11-09 12:06:59 +01:00
parent f377535ed8
commit 257d076668
4 changed files with 85 additions and 4 deletions

View File

@@ -41,8 +41,13 @@ private:
float _uwbDist[4];
bool isRunning = false;
bool _logToDisk = false;
std::shared_ptr<QFile> ftmLogger;
public:
Q_PROPERTY(bool logToDisk READ getLogToDisk WRITE setLogToDisk NOTIFY logToDiskChanged)
Q_PROPERTY(float uwbDist1 READ getUwbDist1() NOTIFY uwbDistChanged)
Q_PROPERTY(float uwbDist2 READ getUwbDist2() NOTIFY uwbDistChanged)
Q_PROPERTY(float uwbDist3 READ getUwbDist3() NOTIFY uwbDistChanged)
@@ -63,6 +68,9 @@ public:
public:
bool getLogToDisk() const { return _logToDisk; }
void setLogToDisk(bool v) { _logToDisk = v; emit logToDiskChanged(v); }
float getUwbDist1() {return _uwbDist[0];}
float getUwbDist2() {return _uwbDist[1];}
float getUwbDist3() {return _uwbDist[2];}
@@ -71,7 +79,8 @@ public:
signals:
void uwbDistChanged();
void newDistMeas(int idx, int value);
void newDistMeas(int idx, int value);
void logToDiskChanged(bool newValue);
public: