![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Time: 17:33 Date: 10/12/2017 Description: Task 1,7,8 Currently Functioning
Dependencies: BME280 BMP280 TextLCD
Working Repository
TIME.hpp@50:3d61ca637399, 2018-01-09 (annotated)
- Committer:
- thomasmorris
- Date:
- Tue Jan 09 12:19:12 2018 +0000
- Revision:
- 50:3d61ca637399
- Parent:
- 34:c0b8705f183d
Dynamic Dating Working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
thomasmorris | 30:4cde05cc7c4f | 1 | #ifndef _TIME_HPP_ //Known as header guards |
thomasmorris | 30:4cde05cc7c4f | 2 | #define _TIME_HPP_ |
thomasmorris | 30:4cde05cc7c4f | 3 | |
thomasmorris | 30:4cde05cc7c4f | 4 | #include "mbed.h" |
thomasmorris | 30:4cde05cc7c4f | 5 | #include "rtos.h" |
thomasmorris | 31:4a88bf97b53e | 6 | #include <string> |
thomasmorris | 31:4a88bf97b53e | 7 | #include <iostream> |
thomasmorris | 31:4a88bf97b53e | 8 | #include <sstream> |
thomasmorris | 30:4cde05cc7c4f | 9 | |
thomasmorris | 31:4a88bf97b53e | 10 | #define Days_In_Month 30.436875 |
thomasmorris | 31:4a88bf97b53e | 11 | #define second 1 |
thomasmorris | 31:4a88bf97b53e | 12 | #define minute 60 |
thomasmorris | 31:4a88bf97b53e | 13 | #define hour 3600 |
thomasmorris | 31:4a88bf97b53e | 14 | #define day 86400 |
thomasmorris | 31:4a88bf97b53e | 15 | #define week 604800 |
thomasmorris | 31:4a88bf97b53e | 16 | #define month 2629743 |
thomasmorris | 31:4a88bf97b53e | 17 | #define year 31556926 |
thomasmorris | 30:4cde05cc7c4f | 18 | |
thomasmorris | 31:4a88bf97b53e | 19 | int get_current_time(); |
chills | 34:c0b8705f183d | 20 | void set_new_date(int days, int months, int years); |
chills | 34:c0b8705f183d | 21 | void set_new_time(int hours, int minutes, int seconds); |
thomasmorris | 31:4a88bf97b53e | 22 | void Add_Second(); |
thomasmorris | 31:4a88bf97b53e | 23 | void Subtract_Second(); |
thomasmorris | 31:4a88bf97b53e | 24 | void Add_Minute(); |
thomasmorris | 31:4a88bf97b53e | 25 | void Subtract_Minute(); |
thomasmorris | 31:4a88bf97b53e | 26 | void Add_Hour(); |
thomasmorris | 31:4a88bf97b53e | 27 | void Subtract_Hour(); |
thomasmorris | 31:4a88bf97b53e | 28 | void Add_Day(); |
thomasmorris | 31:4a88bf97b53e | 29 | void Subtract_Day(); |
thomasmorris | 31:4a88bf97b53e | 30 | void Add_Month(); |
thomasmorris | 31:4a88bf97b53e | 31 | void Subtract_Month(); |
thomasmorris | 31:4a88bf97b53e | 32 | void Add_Year(); |
thomasmorris | 31:4a88bf97b53e | 33 | void Subtract_Year(); |
thomasmorris | 31:4a88bf97b53e | 34 | |
thomasmorris | 30:4cde05cc7c4f | 35 | #endif |