Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: src/AnalyticsLogger/AnalyticsLogger.cpp
- Revision:
- 79:d6638c01eeec
- Parent:
- 77:43e0a3d9e536
- Parent:
- 78:5a2e019036a4
- Child:
- 116:7337ed514891
--- a/src/AnalyticsLogger/AnalyticsLogger.cpp Mon Sep 19 21:03:14 2016 +0000 +++ b/src/AnalyticsLogger/AnalyticsLogger.cpp Mon Sep 19 21:20:43 2016 +0000 @@ -35,16 +35,17 @@ if( CloudDataHandlerConnected == true ) { // we are connected to the cloud, we don't save anything to EEPROM. + logInfo("%s:%d Not logging to EEPROM", __func__, __LINE__); Thread::wait(5000); continue; } - osEvent evt = AnalyticsLoggerMailBox.get(5000); + osEvent evt = AnalyticsLoggerMailBox.get(50); if (evt.status == osEventMail) { AnalyticsLoggerReq_t *mail = (AnalyticsLoggerReq_t*)evt.value.p; logInfo("Analytics Logger Mail Received: Timestamp: %s, Entry: %s", mail->timestamp, mail->log_entry); AnalyticsLoggerMailBox.free(mail); - break; + continue; } curr_sec = time(0); @@ -60,12 +61,14 @@ logInfo("Logging tag=%s, value=%2.2f\r\n", iter->first.c_str(), iter->second.float_value ); } } + + Thread::wait(5000); } } bool AnalyticsLoggerApi( std::string *log_string ) { - logInfo("Sending Mail To AnalyticsLoggerMailbox"); + logInfo("%s:%d Sending Mail To AnalyticsLoggerMailbox", __func__, __LINE__); AnalyticsLoggerReq_t *mail = AnalyticsLoggerMailBox.alloc(); strncpy( mail->log_entry, log_string->c_str(), (sizeof(mail->log_entry)-1)); AnalyticsLoggerMailBox.put(mail);