added compass support added ui elements for gps and compass added support for writing sensor data
52 lines
868 B
C++
52 lines
868 B
C++
#ifndef SENSORFACTORYOFFLINE_H
|
|
#define SENSORFACTORYOFFLINE_H
|
|
|
|
#include <thread>
|
|
|
|
#include "../SensorFactory.h"
|
|
#include "AllInOneSensor.h"
|
|
#include <Indoor/sensors/offline/OfflineAndroid.h>
|
|
|
|
/**
|
|
* factory class that provides sensors that fire events from offline data
|
|
*/
|
|
class SensorFactoryOffline : public SensorFactory {
|
|
|
|
private:
|
|
|
|
AllInOneSensor allInOne;
|
|
|
|
public:
|
|
|
|
SensorFactoryOffline(const std::string& file) : allInOne(file) {
|
|
;
|
|
}
|
|
|
|
WiFiSensor& getWiFi() override {
|
|
return allInOne;
|
|
}
|
|
|
|
AccelerometerSensor& getAccelerometer() override {
|
|
return allInOne;
|
|
}
|
|
|
|
GyroscopeSensor& getGyroscope() override {
|
|
return allInOne;
|
|
}
|
|
|
|
BarometerSensor& getBarometer() override {
|
|
return allInOne;
|
|
}
|
|
|
|
CompassSensor& getCompass() override {
|
|
return allInOne;
|
|
}
|
|
|
|
GPSSensor& getGPS() override {
|
|
return allInOne;
|
|
}
|
|
|
|
};
|
|
|
|
#endif // SENSORFACTORYOFFLINE_H
|