Erick / Mbed 2 deprecated ICE_BLE_TEST

Dependencies:   NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed

Fork of ICE by Erick

Revision:
171:fb29030d4eaf
Parent:
170:f9406996ff5b
Child:
172:51dfb4aabc57
--- a/src/CommandParser/cmd.cpp	Mon Oct 03 21:57:36 2016 +0000
+++ b/src/CommandParser/cmd.cpp	Tue Oct 04 12:22:13 2016 +0000
@@ -415,7 +415,7 @@
         return;
     }
 
-    char data_buf[1024];
+    char data_buf[512];
     snprintf(data_buf, sizeof(data_buf),
              "{ "
              "\"id\":           \"%s\", "
@@ -431,7 +431,7 @@
              "\"lfs\":          \"70\", "
              "\"tol\":          \"%s\"  }", argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
 
-    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 1024);
+    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 512);
     if( status != true ) {
         logInfo("(%d)save file failed, status=%d", __LINE__, status);
         return;
@@ -478,7 +478,7 @@
     char time_buf[32];
     sprintf(time_buf, "%lu", time(NULL)+5);
 
-    char data_buf[1024];
+    char data_buf[512];
     snprintf(data_buf, sizeof(data_buf),
              "{ "
              "\"id\":           \"%s\", "
@@ -489,7 +489,7 @@
             );
 
 
-    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 1024);
+    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 512);
     if( status != true ) {
         logInfo("(%d)save file failed, status=%d", __LINE__, status);
         return;
@@ -521,7 +521,7 @@
     for ( counter = 0; counter < 5; counter++ ) {
         // stuff the file
         sprintf(time_buf, "%lu", time(NULL)+5 + (40 * counter));
-        char data_buf[1024];
+        char data_buf[512];
         snprintf(data_buf, sizeof(data_buf),
                  "{ "
                  "\"id\":           \"timer-%d\", "
@@ -532,7 +532,7 @@
 
         sprintf(filename, "control_tm_%d_rly1.json", counter);
 
-        bool status = GLOBAL_mdot->saveUserFile(filename, (void *)data_buf, 1024);
+        bool status = GLOBAL_mdot->saveUserFile(filename, (void *)data_buf, 512);
         msg = MailBox.alloc();
         memset(msg, 0, sizeof(Message_t));
         msg->action  = ACTION_CREATE;
@@ -549,7 +549,7 @@
     for ( counter = 0; counter < 5; counter++ ) {
         // stuff the file
         sprintf(time_buf, "%lu", time(NULL)+5 + (40 * counter));
-        char data_buf[1024];
+        char data_buf[512];
         snprintf(data_buf, sizeof(data_buf),
                  "{ "
                  "\"id\":           \"timer-%d\", "
@@ -560,7 +560,7 @@
 
         sprintf(filename, "control_tm_%d_rly2.json", counter);
 
-        bool status = GLOBAL_mdot->saveUserFile(filename, (void *)data_buf, 1024);
+        bool status = GLOBAL_mdot->saveUserFile(filename, (void *)data_buf, 512);
         msg = MailBox.alloc();
         memset(msg, 0, sizeof(Message_t));
         msg->action  = ACTION_CREATE;
@@ -591,7 +591,7 @@
         return;
     }
 
-    char data_buf[1024];
+    char data_buf[512];
     snprintf(data_buf, sizeof(data_buf),
              "{ "
              "\"id\":           \"%s\",  "
@@ -604,7 +604,7 @@
              "\"percent\":      \"100\"  }", argv[2], argv[3], atoi(argv[4])
             );
 
-    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 1024);
+    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 512);
     if( status != true ) {
         logInfo("(%d)save file failed, status=%d", __LINE__, status);
         return;
@@ -641,7 +641,7 @@
         return;
     }
 
-    char data_buf[1024];
+    char data_buf[512];
     snprintf(data_buf, sizeof(data_buf),
              "{ "
              "\"id\":       \"%s\", "
@@ -658,7 +658,7 @@
              "\"rfreq\":    \"5\", "
              "\"fmt\":      \"%%.2f\" } ", argv[2], argv[3], argv[4], argv[5]);
 
-    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 1024);
+    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 512);
     if( status != true ) {
         logInfo("(%d)save file failed, status=%d", __LINE__, status);
     }
@@ -686,7 +686,7 @@
         return;
     }
 
-    char data_buf[1024];
+    char data_buf[512];
     snprintf(data_buf, sizeof(data_buf),
              "{ "
              "\"id\":           \"%s\", "
@@ -698,7 +698,7 @@
              "\"percent\":      \"100\", }", argv[2]
             );
 
-    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 1024);
+    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 512);
     if( status != true ) {
         logInfo("(%d)save file failed, status=%d", __LINE__, status);
     }
@@ -721,7 +721,7 @@
         return;
     }
 
-    char data_buf[1024];
+    char data_buf[512];
 
     snprintf(data_buf, sizeof(data_buf),
              "{ "
@@ -742,7 +742,7 @@
              "\"scalelo\":  \"0\", "
              "\"scalehi\":  \"100\" }", argv[2], argv[3], argv[4]);
 
-    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 1024);
+    bool status = GLOBAL_mdot->saveUserFile(argv[1], (void *)data_buf, 512);
     if( status != true ) {
         logInfo("(%d)save file failed, status=%d", __LINE__, status);
     }