![](/media/cache/profiles/ba5be68d3d541f2ca043d77fc54fe702.jpg.50x50_q85.jpg)
3rd Repo, trying to figure this out.
Fork of SOFT253_Template_Weather_OS_54 by
Diff: main.cpp
- Revision:
- 42:b1f29874ab70
- Parent:
- 41:d222c043c96d
- Child:
- 43:3983059e0d91
--- a/main.cpp Wed Apr 05 15:40:24 2017 +0000 +++ b/main.cpp Wed Apr 05 16:12:42 2017 +0000 @@ -100,6 +100,17 @@ } //end while } +int CompareCommands(char command[],char targetcommand[], int size) +{ + int ret = -1, i = 0; + for(i = 0; i< size; i ++) + { + if(command[i] != targetcommand[i]) + return -1; + + } + return 1; +} void ConsumeThread() { char charCmd; @@ -120,8 +131,13 @@ } else { + printf("\r\n\r\nCommand entered: %s\r\n", command); - printf("\r\n\r\nCommand entered: %s\r\n", command); + if(CompareCommands(command,"list all",crtChar) == 1) + { + listBuffer->ListAll(); + } + printf("Awaiting command: \r\n"); int i = 0; for(i =0 ; i < crtChar; i++) @@ -133,6 +149,7 @@ } } + void SendSignalDoMeasure() { measureThread->signal_set(SIGNAL_doMeasure);