library to modify and read program variable in runtime from a serial console. You can reset as well the mbed from the console without pushing buttons. Handy for debugging from the online compiler as you can change the behavior of the program without need to recompile each time.

Revision:
8:934ec53fe2c0
Parent:
4:4be2eaf872df
Child:
9:d081aa4e4418
--- a/VarItems.cpp	Mon Aug 25 17:55:39 2014 +0000
+++ b/VarItems.cpp	Mon Aug 25 19:54:12 2014 +0000
@@ -71,12 +71,6 @@
 
 }
 
-/******
-void   VarItem::SetVarType(VarTypes VarType)
-{
-    this->VarType=VarType;
-}
-*******/
 
 void VarItem::SetVarArraySize(int Size)
 {
@@ -93,7 +87,7 @@
 
 char *VarItem::Dump()
 {
-
+pc.puts(" 0 \n");
     static char *StrDump=NULL;
 
     unsigned int DumpSize=0;
@@ -106,6 +100,7 @@
     StrDump=(char *)malloc(DumpSize);
     memset(StrDump,0,DMP_SZ);
 
+pc.puts(" 1 \n");
     do {
         switch(VarType) {
             case T_int:
@@ -115,6 +110,7 @@
                 sprintf(Tmp,"%f,",*(ValFloat+ArrayCounter));
                 break;
         };
+pc.puts(" 2 \n");
         if(DumpCounter+strlen(Tmp) >= DumpSize) {
             char *d;
             DumpSize = DumpCounter+DMP_SZ;
@@ -123,6 +119,7 @@
             free(StrDump);
             StrDump=d;
         }
+pc.puts(" 3 \n");
         strcat(StrDump+DumpCounter,Tmp);
         DumpCounter+=strlen(Tmp);
         ArrayCounter++;