Time: 17:33 Date: 10/12/2017 Description: Task 1,7,8 Currently Functioning
Dependencies: BME280 BMP280 TextLCD
Working Repository
SETUP.hpp@50:3d61ca637399, 2018-01-09 (annotated)
- Committer:
- thomasmorris
- Date:
- Tue Jan 09 12:19:12 2018 +0000
- Revision:
- 50:3d61ca637399
- Parent:
- 48:244d6d81bb52
Dynamic Dating Working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 41:859b5e1e3d9a | 1 | #ifndef _SETUP_HPP_ //SETUP header guard |
thomasmorris | 25:36699ed589ab | 2 | #define _SETUP_HPP_ |
thomasmorris | 41:859b5e1e3d9a | 3 | //File includes |
thomasmorris | 25:36699ed589ab | 4 | #include "rtos.h" |
thomasmorris | 25:36699ed589ab | 5 | #include "LED.hpp" |
thomasmorris | 25:36699ed589ab | 6 | #include "DATA.hpp" |
thomasmorris | 25:36699ed589ab | 7 | #include "LCD.hpp" |
thomasmorris | 25:36699ed589ab | 8 | #include "SERIAL.hpp" |
thomasmorris | 30:4cde05cc7c4f | 9 | #include "TIME.hpp" |
thomasmorris | 41:859b5e1e3d9a | 10 | #include <iostream> |
thomasmorris | 38:8d86e0d8a816 | 11 | |
thomasmorris | 41:859b5e1e3d9a | 12 | //Signal definitions |
thomasmorris | 47:6d128e500875 | 13 | |
thomasmorris | 47:6d128e500875 | 14 | //Mutex Locks |
thomasmorris | 47:6d128e500875 | 15 | |
thomasmorris | 38:8d86e0d8a816 | 16 | |
thomasmorris | 41:859b5e1e3d9a | 17 | //Time definitions |
thomasmorris | 45:875f7e18a386 | 18 | #define TimerInterval 15 //This is in seconds |
thomasmorris | 41:859b5e1e3d9a | 19 | |
thomasmorris | 37:7c4d7f206039 | 20 | |
thomasmorris | 41:859b5e1e3d9a | 21 | |
thomasmorris | 41:859b5e1e3d9a | 22 | //Forward Declarations of functions |
thomasmorris | 25:36699ed589ab | 23 | |
thomasmorris | 25:36699ed589ab | 24 | void Serial_Comms(); |
chills | 26:78f5e454e59f | 25 | void Sample_signal_set(); |
chills | 26:78f5e454e59f | 26 | void Console_Output_ISR(); |
thomasmorris | 41:859b5e1e3d9a | 27 | void Serial_Comms_Data_Get(); |
thomasmorris | 41:859b5e1e3d9a | 28 | void Sampling_ISR(); |
thomasmorris | 41:859b5e1e3d9a | 29 | void Console_Output_ISR(); |
thomasmorris | 41:859b5e1e3d9a | 30 | //Declarations of Varialbes |
thomasmorris | 25:36699ed589ab | 31 | |
thomasmorris | 25:36699ed589ab | 32 | float Sample_Rate; |
thomasmorris | 41:859b5e1e3d9a | 33 | int LCD_sprintf; |
thomasmorris | 41:859b5e1e3d9a | 34 | double temp = 0; |
thomasmorris | 41:859b5e1e3d9a | 35 | double pressure = 0; |
thomasmorris | 41:859b5e1e3d9a | 36 | double lux = 0; |
thomasmorris | 41:859b5e1e3d9a | 37 | string buffer_time = 0; |
thomasmorris | 41:859b5e1e3d9a | 38 | char buffer[32]; |
thomasmorris | 41:859b5e1e3d9a | 39 | char scom_time_buffer[32]; |
thomasmorris | 41:859b5e1e3d9a | 40 | char msel_time_buffer[32]; |
thomasmorris | 41:859b5e1e3d9a | 41 | |
thomasmorris | 47:6d128e500875 | 42 | |
thomasmorris | 25:36699ed589ab | 43 | |
thomasmorris | 41:859b5e1e3d9a | 44 | //Time out Declarations |
thomasmorris | 25:36699ed589ab | 45 | Timeout sw1TimeOut;//Used to prevent switch bounce |
thomasmorris | 30:4cde05cc7c4f | 46 | Timeout sw2TimeOut;//Used to prevent switch bounce |
thomasmorris | 25:36699ed589ab | 47 | |
thomasmorris | 25:36699ed589ab | 48 | |
thomasmorris | 25:36699ed589ab | 49 | |
thomasmorris | 41:859b5e1e3d9a | 50 | using namespace std;//Set default namespace enables use of iostream with serial comms |
thomasmorris | 25:36699ed589ab | 51 | #endif |