added gps support

added compass support
added ui elements for gps and compass
added support for writing sensor data
This commit is contained in:
2017-03-21 16:27:14 +01:00
parent c7c94cbebe
commit b0712ec005
24 changed files with 586 additions and 30 deletions

View File

@@ -20,6 +20,14 @@
#include "android/BarometerSensorAndroid.h"
#include "dummy/BarometerSensorDummy.h"
#include "GPSSensor.h"
#include "android/GPSSensorAndroid.h"
#include "dummy/GPSSensorDummy.h"
#include "CompassSensor.h"
#include "android/CompassSensorAndroid.h"
#include "dummy/CompassSensorDummy.h"
#include "StepSensor.h"
#include "TurnSensor.h"
#include "ActivitySensor.h"
@@ -39,13 +47,13 @@ public:
/** set the to-be-used sensor-fatory */
static void set(SensorFactory* fac) {
Assert::isNull(*getPtr(), "set() was already called. currentely this is not intended");
Assert::isNull(*getPtr(), "SensorFactory::set() was already called. currentely this is not intended");
*getPtr() = fac;
}
/** get the currently configured sensory factory */
static SensorFactory& get() {
Assert::isNotNull(*getPtr(), "call set() first to set an actual factory instance!");
Assert::isNotNull(*getPtr(), "call SensorFactory::set() first to set an actual factory instance!");
return **getPtr();
}
@@ -63,6 +71,13 @@ public:
/** get the Barometer sensor */
virtual BarometerSensor& getBarometer() = 0;
/** get the compass sensor */
virtual CompassSensor& getCompass() = 0;
/** get the gps sensor */
virtual GPSSensor& getGPS() = 0;
/** get the Step sensor */
StepSensor& getSteps() {
static StepSensor steps(getAccelerometer());