FINAL PROJECT isn't it

Fork of ELEC351 by Plymouth ELEC351 Group T

Revision:
47:6d128e500875
Parent:
45:875f7e18a386
Child:
48:244d6d81bb52
--- a/SETUP.hpp	Mon Jan 08 19:03:49 2018 +0000
+++ b/SETUP.hpp	Mon Jan 08 21:53:40 2018 +0000
@@ -1,7 +1,6 @@
 #ifndef _SETUP_HPP_ //SETUP header guard
 #define _SETUP_HPP_
 //File includes
-#include "sample_hardware.hpp"
 #include "rtos.h"
 #include "LED.hpp"
 #include "DATA.hpp"
@@ -11,34 +10,15 @@
 #include <iostream>
 
 //Signal definitions
-#define SerialCommsTime 1
-#define NotSerialCommsTime 0
-#define SamplingTime 1
-#define NotSamplingTime 0
-#define Print_Time_to_LCD 1
-#define Dont_Print_Time_to_LCD 0
-#define EDGE_RISEN 1
-#define EDGE_FALLEN 0
-#define SD_Data_Ready 1
-#define No_SD_Data_Ready 0
+
+//Mutex Locks
+
 
 //Time definitions
 #define TimerInterval 15 //This is in seconds
-#define Default_Mode_Toggle_Time 3000
 #define NetworkWait 5000
 
-//Definition of Data buffer size (120 in specification)
-#define mailsize 120
-int temp_mail_size = mailsize;
-DATA Data_Active;//Current data sample
-DATA Data_Buffer[mailsize];//Data buffer
-int Data_Buffer_Write_Pointer;
-int Write_To_Data_Buffer(DATA Data_Store, int Write_Pointer);
-int Write_Pointer = 0;
 
-LCD LCD(D8,D9,D4,A0,A1,A2,A3,D7,D6,D3,D1);//LCD object creation via constructor
-
-Serial pc(USBTX, USBRX);//Define serial namespace so the serial comms can be printed to
 
 //Forward Declarations of functions
 
@@ -51,10 +31,7 @@
 //Declarations of Varialbes
 
 float Sample_Rate;
-int mode = 0;//Used to switch modes in serial comms
-char LCD_buffer [50];
 int LCD_sprintf;
-int Log_Value = 0;
 double temp = 0;
 double pressure = 0;
 double lux = 0;
@@ -63,33 +40,12 @@
 char scom_time_buffer[32];
 char msel_time_buffer[32];
 
-//Thread IDs
-osThreadId idMain;
-osThreadId id1;
-osThreadId id2;
-osThreadId id3;
-osThreadId id4;
-osThreadId id5;
+
 
 //Time out Declarations
 Timeout sw1TimeOut;//Used to prevent switch bounce
 Timeout sw2TimeOut;//Used to prevent switch bounce
 
-//LED object constructors
-LED Red_led(PE_15);
-LED Yellow_led(PB_10);
-LED Green_led(PB_11);
-
-//Tickers
-Ticker Sampling_Timer;//Controls Sampling
-Ticker Console_Output_Timer;//Controls Serial comms
-
-//Threads
-Thread t1(osPriorityRealtime); //Sampler Set to a highest priority
-Thread t2;
-Thread t3;
-Thread t4;
-Thread t5;
 
 
 using namespace std;//Set default namespace enables use of iostream with serial comms