3rd Repo, trying to figure this out.

Dependencies:   LPS25H hts221

Fork of SOFT253_Template_Weather_OS_54 by Stage-1 Students SoCEM

Revision:
73:cfad270d2f2c
Parent:
72:ef4a4e3089c1
Child:
74:749727490f44
--- a/main.cpp	Fri Apr 21 18:49:48 2017 +0000
+++ b/main.cpp	Fri Apr 21 19:55:45 2017 +0000
@@ -140,7 +140,6 @@
 //          "1 " IF EQUAL
 int CompareCommands(char command[],char targetcommand[], int size)
 {
-       i;
        for(i = 0; i < size; i ++)
        {
             if(command[i] != targetcommand[i])
@@ -240,7 +239,7 @@
                        
                 }
                 //Check if it's a "STATUS" command
-                else if (CompareCommands(charPos,"status",6) == 1)
+                else if (CompareCommands(charPos,"s",6) == 1)
                 {
                     char *ptr = localDate->ToString();
                     
@@ -350,7 +349,7 @@
                     charPos = strtok(NULL," ,");
                     float auxRate = atof(charPos);
                     // Validate rate
-                    if(auxRate >= 0.01 && 
+                    if(auxRate >= 0.1 && 
                        auxRate <= 60 )
                     {
                         sampleRate = auxRate;
@@ -394,6 +393,19 @@
         }
     }
 }
+
+void LoggingThread()
+{
+     // ARRON: TODO
+     
+     // - Printing messages
+     // - Out of memory
+     // - Current status
+     // - Display time every X seconds/minutes
+     
+     // Some queue system holding lines to print
+     // If the queue has something to print, print it.
+}
  
 // Main thread
 int main() {
@@ -421,6 +433,7 @@
     printf("Main Thread\n");
     while(1) 
     {
+        // Is there a sleep method that could be used instead or waiting and awaking every 3 seconds?
         Thread::wait(3000);
     }
 } 
\ No newline at end of file