started to add ble functions
added ble as sensor to java and c++ added sensorlistener for ble added ble to observation and onDataSensor in filter started to work on ble fingerprints for optimization
This commit is contained in:
@@ -42,66 +42,67 @@
|
||||
class Controller;
|
||||
|
||||
class NavController :
|
||||
public SensorListener<AccelerometerData>,
|
||||
public SensorListener<GyroscopeData>,
|
||||
public SensorListener<BarometerData>,
|
||||
public SensorListener<WiFiMeasurements>,
|
||||
public SensorListener<GPSData>,
|
||||
public SensorListener<StepData>,
|
||||
public SensorListener<AccelerometerData>,
|
||||
public SensorListener<BeaconMeasurement>,
|
||||
public SensorListener<GyroscopeData>,
|
||||
public SensorListener<BarometerData>,
|
||||
public SensorListener<WiFiMeasurements>,
|
||||
public SensorListener<GPSData>,
|
||||
public SensorListener<StepData>,
|
||||
public SensorListener<TurnData>,
|
||||
public SensorListener<ActivityData>
|
||||
{
|
||||
{
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
Controller* mainController;
|
||||
Floorplan::IndoorMap* im;
|
||||
Controller* mainController;
|
||||
Floorplan::IndoorMap* im;
|
||||
|
||||
bool running = false;
|
||||
std::thread tFilter;
|
||||
std::thread tDisplay;
|
||||
bool running = false;
|
||||
std::thread tFilter;
|
||||
std::thread tDisplay;
|
||||
|
||||
/** the estimated path */
|
||||
std::vector<Point3> estPath;
|
||||
/** the estimated path */
|
||||
std::vector<Point3> estPath;
|
||||
|
||||
/** all listeners */
|
||||
std::vector<NavControllerListener*> listeners;
|
||||
/** all listeners */
|
||||
std::vector<NavControllerListener*> listeners;
|
||||
|
||||
/** display stuff */
|
||||
const int display_ms = Settings::MapView3D::msPerFrame.ms();
|
||||
Point3 curPosFast;
|
||||
Point3 curPosSlow;
|
||||
CurEst curEst;
|
||||
/** display stuff */
|
||||
const int display_ms = Settings::MapView3D::msPerFrame.ms();
|
||||
Point3 curPosFast;
|
||||
Point3 curPosSlow;
|
||||
CurEst curEst;
|
||||
|
||||
Timestamp lastTransition;
|
||||
Timestamp lastTransition;
|
||||
|
||||
public:
|
||||
|
||||
NavController(Controller* mainController, Floorplan::IndoorMap* im);
|
||||
NavController(Controller* mainController, Floorplan::IndoorMap* im);
|
||||
|
||||
virtual ~NavController() {
|
||||
if (running) {stop();}
|
||||
}
|
||||
virtual ~NavController() {
|
||||
if (running) {stop();}
|
||||
}
|
||||
|
||||
/** attach a new event listener */
|
||||
void addListener(NavControllerListener* l) {
|
||||
listeners.push_back(l);
|
||||
}
|
||||
/** attach a new event listener */
|
||||
void addListener(NavControllerListener* l) {
|
||||
listeners.push_back(l);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
virtual void stop() {;}
|
||||
virtual void stop() {;}
|
||||
|
||||
virtual void start() = 0;
|
||||
virtual void start() = 0;
|
||||
|
||||
int cameraMode = 0;
|
||||
void toggleCamera() {
|
||||
cameraMode = (cameraMode + 1) % 3;
|
||||
}
|
||||
int cameraMode = 0;
|
||||
void toggleCamera() {
|
||||
cameraMode = (cameraMode + 1) % 3;
|
||||
}
|
||||
|
||||
/** update the map-view (called from within a background-loop) */
|
||||
void updateMapView();
|
||||
/** update the map-view (called from within a background-loop) */
|
||||
void updateMapView();
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user