Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: MbedAgent.cpp
- Revision:
- 47:89ae46d5c466
- Parent:
- 46:f6976fd64387
- Child:
- 52:8f1370084268
diff -r f6976fd64387 -r 89ae46d5c466 MbedAgent.cpp --- a/MbedAgent.cpp Thu Jul 24 16:02:47 2014 +0000 +++ b/MbedAgent.cpp Thu Jul 24 23:32:53 2014 +0000 @@ -11,6 +11,8 @@ _signalQualityMeasurement(_client, _tpl, _deviceId, _deviceInfo), _temperatureMeasurement(_client, _tpl, _deviceId, _io.temperatureSensor()), _accelerationMeasurement(_client, _tpl, _deviceId, _io.accelerometer()), + _analogMeasurement(_client, _tpl, _deviceId, _io.analog1(), _io.analog2()), + _locationUpdate(_client, _tpl, _deviceId, _io.gpsTracker()), _deviceId(0) { } @@ -20,7 +22,9 @@ if ((!_integration.init()) || (!_signalQualityMeasurement.init()) || (!_temperatureMeasurement.init()) || - (!_accelerationMeasurement.init())) { + (!_accelerationMeasurement.init()) || + (!_analogMeasurement.init()) || + (!_locationUpdate.init())) { puts("Initialization failed."); return false; } @@ -62,9 +66,13 @@ while (true) { timer.reset(); - _signalQualityMeasurement.run(); + puts("Sending signal quality."); + if (!_signalQualityMeasurement.run()) + puts("Failed signal str."); _temperatureMeasurement.run(); _accelerationMeasurement.run(); + _analogMeasurement.run(); + _locationUpdate.run(); while (timer.read() < MBED_AGENT_INTERVAL) { Thread::yield();