Panagiotis Mitseas
/
SOFT253_Assignment_V3
READDELETEALL
Fork of SOFT253_Assignment_V2 by
Revision 41:0f4a18bb1f83, committed 2017-05-13
- Comitter:
- Mpoumtsakalaka
- Date:
- Sat May 13 20:28:50 2017 +0000
- Parent:
- 40:4ea91e49d60c
- Commit message:
- ee
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat May 13 19:55:22 2017 +0000 +++ b/main.cpp Sat May 13 20:28:50 2017 +0000 @@ -97,6 +97,8 @@ { int res; int res2; + + pc.baud(115200); pc.printf("Temperature,Humidity,Pressure\n\n"); @@ -124,7 +126,7 @@ // wait(1.0); } } - else + else //1 { strcpy (stringToCompare2,"DELETE"); strcpy (stringToCompare22,"ALL"); @@ -137,34 +139,41 @@ memset(tempArray, 0, sizeof tempArray); pc.printf("%d Elements deleted\n",N); } - else + else //2 { strcpy (stringToCompare2,"READ"); strcpy (stringToCompare22,"Kapoion arithmo"); - res = strncmp(readAll1,stringToCompare2,20); - res2 = strncmp(readAll11,stringToCompare22,20); + res = strncmp(input1,stringToCompare2,20); + res2 = strncmp(input11,stringToCompare22,20); if(res==0 && res2==0) { } - else + else //3 { + strcpy (stringToCompare2,"DELETE"); +// strcpy (stringToCompare22,"Kapoion arithmo"); +// res = strncmp(input1,stringToCompare2,20); +// res2 = strncmp(input11,stringToCompare22,20); + +// int numberOfElements; //To input sto DELETE <n> + - } - } - } - - +// if(res==0 && res2==0) +// { +// memset(tempArray, 0, numberOfElements); +// } +// else //4 +// { + //EDW tha paei to setDate + +// }//End of else 4 + }//End of else 3 + }//End of else 2 + }//End of else 1 - - - //switch(cmd) - //{ - // case 'f': pc.printf("Douleuei"); - //} - - + }//End of while