FINAL PROJECT isn't it

Fork of ELEC351 by Plymouth ELEC351 Group T

Revision:
28:09b5c46c8afd
Parent:
27:807dd5660c4b
Child:
29:64b1f95a807c
--- a/main.cpp	Wed Jan 03 16:26:42 2018 +0000
+++ b/main.cpp	Wed Jan 03 21:12:25 2018 +0000
@@ -146,7 +146,7 @@
         } 
         else if(Serial_Input == "READ") 
         {
-
+            
         } 
         else if(Serial_Input == "DELETE")
         {
@@ -194,7 +194,7 @@
         }
         else if(Serial_Input == "STOP")
         {
-            Console_Output_Timer.detach();    
+            Console_Output_Timer.detach(); //Stops Sampling   
         }
         else 
         {
@@ -205,7 +205,7 @@
 void Serial_Comms()//Thread for Serial Communications
 {
     while(1) {
-        Thread::signal_wait(1);
+        Thread::signal_wait(SerialCommsTime);//Stupid 0 Bug
         osEvent evt_serial = mail_box.get();                                        //Get the latest entry from "mail_box"
 
         if (evt_serial.status == osEventMail) {
@@ -230,7 +230,7 @@
     }
 }
 
-void Console_Output_ISR()   {t2.signal_set(1);}
+void Console_Output_ISR()   {t2.signal_set(SerialCommsTime);}
 void Sampling_ISR()         {t1.signal_set(SamplingTime);}
 
 
@@ -277,16 +277,16 @@
     pc.baud(9600);                      //Sets the Serial Comms Baud Rate
 
     LCD.Initialise();
-    LCD.DDRAM_Address(0x40);
+    LCD.DDRAM_Address(0x00);
 
-    /*
+    
     post();     //Power on Self Test
 
     //Initialise the SD card (this needs to move)
     if ( sd.init() != 0) {
         printf("Init failed \n");
-        lcd.cls();
-        lcd.printf("CANNOT INIT SD");        //Change me
+        LCD.Display_Clear();
+        LCD.Write_String("CANNOT INIT SD");        //Change me
         errorCode(FATAL);
     }
 
@@ -297,15 +297,15 @@
     FILE* fp = fopen("/sd/test.csv","a");
     if (fp == NULL) {
         error("Could not open file for write\n");
-        lcd.cls();
-        lcd.printf("CANNOT OPEN FILE\n\n");//Change me
+        LCD.Display_Clear();
+        LCD.Write_String("CANNOT OPEN FILE\n\n");//Change me
         errorCode(FATAL);
     }
-    */
+    
 
     //Last message before sampling begins
-    lcd.cls();//change me
-    lcd.printf("READY\n\n");//change me
+    LCD.Display_Clear();
+    LCD.Write_String("READY\n\n");//change me
 
 
     Sample_Rate = TimerInterval;