![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: MbedAgent.cpp
- Revision:
- 83:3c8ceb12b773
- Parent:
- 82:ca7430f50b2b
- Child:
- 85:b49c4cfecc43
--- a/MbedAgent.cpp Fri Mar 06 10:38:03 2015 +0000 +++ b/MbedAgent.cpp Fri Mar 06 11:10:48 2015 +0000 @@ -3,6 +3,8 @@ #include "logging.h" #include "watchdog.h" +bool lastSensorReadingSent=true; + MbedAgent::MbedAgent(DeviceIO& io, MDMSerial& mdm, DeviceInfo& deviceInfo, DeviceMemory& deviceMemory) : _io(io), _mdm(mdm), @@ -97,6 +99,7 @@ void MbedAgent::loop() { Watchdog wdt; + char signal[25] = {0}; DigitalIn joystickUp(A2); DigitalIn joystickDown(A3); // DigitalIn joystickLeft(A4); @@ -113,6 +116,13 @@ _mdm.setDebug(3); printf("***Enabled debug mode.***\r\n"); } + DeviceInfo::SignalQuality *p = _deviceInfo.signalQuality(false); + if (p && p->rssi) + snprintf(signal, sizeof(signal), "Network: %d dBm", p->rssi); + else + strncpy(signal, "Network: no coverage", sizeof(signal)); + _displayInfo.setSecondLine(signal); + _configurationSynchronization.run(); _signalQualityMeasurement.run(); _temperatureMeasurement.run();