-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathWeatherRecord.cpp
135 lines (108 loc) · 4.14 KB
/
WeatherRecord.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#include "WeatherRecord.h"
WeatherRecord::WeatherRecord(){
}
//---------------------------------------- Temperature ----------------------------------------
void WeatherRecord::setTemperature(float value){
temperature=value;
}
float WeatherRecord::getTemperature()
{
return temperature;
}
//----------------------------------------------------------------------------------------------
//----------------------------------------- Humidity -------------------------------------------
void WeatherRecord::setHumidity(float value){
humidity=value;
}
float WeatherRecord::getHumidity(){
return humidity;
}
//----------------------------------------------------------------------------------------------
//----------------------------------------- Pressure -------------------------------------------
void WeatherRecord::setPressure(float value){
pressure=value;
}
float WeatherRecord::getPressure(){
return pressure;
}
//----------------------------------------------------------------------------------------------
//------------------------------------------- Wind Speed --------------------------------------
void WeatherRecord::setWindSpeed(float value){
windSpeed=value;
}
float WeatherRecord::getWindSpeed(){
return windSpeed;
}
//----------------------------------------------------------------------------------------------
// ------------------------------------------- Wind Direction ---------------------------------
void WeatherRecord::setWindDirection(float value){
windDirection=value;
}
float WeatherRecord::getWindDirection(){
return windDirection;
}
//----------------------------------------------------------------------------------------------
// ------------------------------------------- Wind Gust --------------------------------------
void WeatherRecord::setWindGust(float value){
windGust=value;
}
float WeatherRecord::getWindGust(){
return windGust;
}
//----------------------------------------------------------------------------------------------
// ------------------------------------------- Amount Rain ------------------------------------
void WeatherRecord::setAmountRain(float value){
amountRain=value;
}
float WeatherRecord::getAmountRain(){
return amountRain;
}
//----------------------------------------------------------------------------------------------
// ------------------------------------------- Rain Clicks ------------------------------------
void WeatherRecord::setRainClicks(unsigned long value){
rainClicks=value;
}
unsigned long WeatherRecord::getRainClicks(){
return rainClicks;
}
//----------------------------------------------------------------------------------------------
// ------------------------------------------- Wind Clicks ------------------------------------
void WeatherRecord::setWindClicks(unsigned long value){
windClicks=value;
}
unsigned long WeatherRecord::getWindClicks(){
return windClicks;
}
//----------------------------------------------------------------------------------------------
// ------------------------------------------- Battery Voltage --------------------------------
void WeatherRecord::setBatteryVoltage(float value){
battery=value;
}
float WeatherRecord::getBatteryVoltage(){
return battery;
}
//----------------------------------------------------------------------------------------------
//--------------------------------------- INA219 -------------------------------------------------
#ifdef ENABLE_INA
void WeatherRecord::setBatteryINA(float value){
batteryINA=value;
}
float WeatherRecord::getBatteryINA(){
return batteryINA;
}
// ------------------------------------------- Max Current ------------------------------------
void WeatherRecord::setMaxCurrent(float value){
maxCurrent=value;
}
float WeatherRecord::getMaxCurrent(){
return maxCurrent;
}
// ------------------------------------------- Min Current ------------------------------------
void WeatherRecord::setMinCurrent(float value){
minCurrent=value;
}
float WeatherRecord::getMinCurrent(){
return minCurrent;
}
#endif
//----------------------------------------------------------------------------------------------