Official reference client implementation for Cumulocity SmartREST on u-blox C027.

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Vincent Wochnik

Files at this revision

API Documentation at this revision

Comitter:
vwochnik
Date:
Wed Apr 16 07:44:36 2014 +0000
Parent:
24:8f9b678a7932
Child:
26:26e9899e2cbe
Commit message:
fix

Changed in this revision

MbedSmartRest.lib Show annotated file Show diff for this revision Revisions of this file
program.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MbedSmartRest.lib	Tue Apr 15 16:59:56 2014 +0000
+++ b/MbedSmartRest.lib	Wed Apr 16 07:44:36 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/vwochnik/code/MbedSmartRestStreaming/#0ce90c525e7a
+http://mbed.org/users/vwochnik/code/MbedSmartRestStreaming/#ee4f052c7570
--- a/program.cpp	Tue Apr 15 16:59:56 2014 +0000
+++ b/program.cpp	Wed Apr 16 07:44:36 2014 +0000
@@ -78,7 +78,6 @@
         }
     }
     update(deviceId);
-
     printf("Device ID: %ld\r\n", deviceId);
 
     timer.start();
@@ -253,26 +252,31 @@
 
 void loop(long deviceId)
 {
-    Aggregator aggr(5, false, true);
+    Aggregator aggr(8, false, true);
 
     lcd_status("Sending measurements...");
     signalMeasurement(deviceId, aggr);
     if (client.send(aggr) != SMARTREST_SUCCESS) {
-        puts("Send failed.");
+        puts("Loop send failed.");
     }
     client.stop();
     aggr.clear();
     temperatureMeasurement(deviceId, aggr);
+    if (client.send(aggr) != SMARTREST_SUCCESS) {
+        puts("Loop send failed.");
+    }
+    client.stop();
+    aggr.clear();
     analogMeasurement(deviceId, aggr);
     if (client.send(aggr) != SMARTREST_SUCCESS) {
-        puts("Send failed.");
+        puts("Loop send failed.");
     }
     client.stop();
     aggr.clear();
     motionMeasurement(deviceId, aggr);
 
     if (client.send(aggr) != SMARTREST_SUCCESS) {
-        puts("Send failed.");
+        puts("Loop send failed.");
     }
     client.stop();
 }