瀏覽代碼

Updated the example.

Benoît Blanchon 12 年之前
父節點
當前提交
bb11fcba89
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/JsonGeneratorExample/JsonGeneratorExample.ino

+ 2 - 2
examples/JsonGeneratorExample/JsonGeneratorExample.ino

@@ -12,8 +12,8 @@ void setup()
     Serial.begin(9600);
 
     JsonArray<2> array;
-    array.add(48.756080, 6);
-    array.add(2.302038, 6);
+    array.add<6>(48.756080); // 6 is the number of decimals to print
+    array.add<6>(2.302038);  // if not specified, 2 digits are printed
 
     JsonHashTable<3> root; 
     root.add("sensor", "gps");