The Cayenne MQTT mbed Library provides functions to easily connect to the Cayenne IoT project builder.

Fork of Cayenne-MQTT-mbed by myDevicesIoT

Revision:
8:aec9cfdd4c8e
Parent:
6:82e142a864ad
Child:
15:1f4d5dbf1928
--- a/src/CayenneUtils/CayenneDataArray.h	Tue Oct 25 16:23:07 2016 -0600
+++ b/src/CayenneUtils/CayenneDataArray.h	Wed Oct 26 16:33:46 2016 -0600
@@ -24,7 +24,7 @@
 
 // C++ version of the data array. This is defined here so it requires no source file.
 
-namespace Cayenne
+namespace CayenneMQTT
 {
 	/**
 	* @class DataArray
@@ -289,11 +289,7 @@
 		*/
 		inline void add(const __FlashStringHelper* unit, const float value) {
 			char str[33];
-#if defined(__AVR__) || defined (ARDUINO_ARCH_ARC32)
-            dtostrf(value, 5, 3, str);
-#else
-            snprintf(str, 33, "%2.3f", value);
-#endif
+			dtostrf(value, 5, 3, str);
 			add(unit, str);
 		}
 
@@ -304,11 +300,7 @@
 		*/
 		inline void add(const __FlashStringHelper* unit, const double value) {
 			char str[33];
-#if defined(__AVR__) || defined (ARDUINO_ARCH_ARC32)
-            dtostrf(value, 5, 3, str);
-#else
-            snprintf(str, 33, "%2.3f", value);
-#endif
+			dtostrf(value, 5, 3, str);
 			add(unit, str);
 		}
 
@@ -337,7 +329,7 @@
 	};
 }
 
-typedef Cayenne::DataArray<> CayenneDataArray;
+typedef CayenneMQTT::DataArray<> CayenneDataArray;
 
 #else