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

Revision:
96:5dfdc8568e9f
Parent:
69:237c01eb36c2
--- a/config/ConfigurationProperties.cpp	Wed Apr 22 11:22:25 2015 +0000
+++ b/config/ConfigurationProperties.cpp	Mon Apr 27 10:50:21 2015 +0000
@@ -1,12 +1,7 @@
-#include "ConfigurationProperties.h"
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
-
-ConfigurationProperties::ConfigurationProperties(DeviceConfiguration& deviceConfiguration) :
-    _deviceConfiguration(deviceConfiguration)
-{
-}
+#include "ConfigurationProperties.h"
 
 bool ConfigurationProperties::resetConfiguration()
 {
@@ -15,17 +10,17 @@
 
 bool ConfigurationProperties::validateProperties()
 {
-    return (readInterval() > 0);
+    return (readInterval() >= 0);
 }
 
 int ConfigurationProperties::readInterval()
 {
-    const char *prop; int res, ln;
-    
-    if ((prop = _deviceConfiguration.get("interval")) == NULL)
+    const char *prop = _deviceConfiguration.get("interval");    
+    if (prop == NULL)
         prop = CONFIGURATION_PROPERTY_INTERVAL;
-    
-    ln = -1;
+
+    int res;
+    int ln = -1;
     if ((sscanf(prop, "%d%n", &res, &ln) != 1) || (ln != strlen(prop)))
         return 0;