added main menu added debug display many debug widgets for plotting live data worked on android live sensors added offline-data sensor feeding some dummy data sensors worked on the map display added ui debug for grid-points, particles and weights added a cool dude to display the estimation added real filtering based on the Indoor components c++11 fixes for android compilation online and offline filtering support new resampling technique for testing map loading via dialog
57 lines
904 B
C++
57 lines
904 B
C++
#ifndef ACCELEROMETERSENSORANDROID_H
|
|
#define ACCELEROMETERSENSORANDROID_H
|
|
|
|
|
|
#ifdef ANDROID
|
|
|
|
#include <sstream>
|
|
|
|
#include "../AccelerometerSensor.h"
|
|
|
|
#include <QtSensors/QAccelerometer>
|
|
|
|
#include "../AccelerometerSensor.h"
|
|
|
|
class AccelerometerSensorAndroid : public AccelerometerSensor {
|
|
|
|
private:
|
|
|
|
QAccelerometer acc;
|
|
|
|
/** hidden ctor. use singleton */
|
|
AccelerometerSensorAndroid() {
|
|
;
|
|
}
|
|
|
|
public:
|
|
|
|
/** singleton access */
|
|
static AccelerometerSensorAndroid& get() {
|
|
static AccelerometerSensorAndroid acc;
|
|
return acc;
|
|
}
|
|
|
|
void start() override {
|
|
|
|
auto onSensorData = [&] () {
|
|
AccelerometerData data(acc.reading()->x(), acc.reading()->y(), acc.reading()->z());
|
|
informListeners(data);
|
|
};
|
|
|
|
acc.connect(&acc, &QAccelerometer::readingChanged, onSensorData);
|
|
acc.start();
|
|
|
|
}
|
|
|
|
void stop() override {
|
|
throw "TODO";
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
#endif // ANDROID
|
|
|
|
#endif // ACCELEROMETERSENSORANDROID_H
|