added gps support
added compass support added ui elements for gps and compass added support for writing sensor data
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user