-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathWeatherRecord.h
66 lines (57 loc) · 2.47 KB
/
WeatherRecord.h
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
#ifndef WEATHER_RECORD
#define WEATHER_RECORD
#include "Arduino.h"
class WeatherRecord
{
public:
//Public Functions
WeatherRecord();
void setTemperature(float value); // Set Weather Record Temperature (ºC)
float getTemperature(); // Return Weather Record Temperature (ºC)
void setHumidity(float value); // Set Weather Record Humidity (%)
float getHumidity(); // Return Weather Record Humidity (%)
void setPressure(float value); // Set Weather Record Pressure (kPa)
float getPressure(); // Return Weather Record Pressure (kPa)
void setWindSpeed(float value); // Set Weather Record Wind Speed (kPh)
float getWindSpeed(); // Return Weather Record Wind Speed (kPh)
void setWindDirection(float value); // Set Weather Record Wind Direction (º)
float getWindDirection(); // Return Weather Record Wind Direction (º)
void setWindGust(float value); // Set Weather Record Wind Gust (kPh)
float getWindGust(); // Return Weather Record Wind Gust (kPh)
void setAmountRain(float value); // Set Weather Record Amount of Rain (mm)
float getAmountRain(); // Return Weather Record Amount of Rain (mm)
void setBatteryVoltage(float value); // Set Weather Record Battery Voltage (V)
float getBatteryVoltage(); // Return Weather Record Battery Voltage (V)
void setRainClicks(unsigned long value); // Set Weather Record Rain Clicks (nº of interrupts)
unsigned long getRainClicks(); // Return Weather Record Rain Clicks (nº of interrupts)
void setWindClicks(unsigned long value); // Set Weather Record Wind Clicks (nº of interrupts)
unsigned long getWindClicks(); // Return Weather Record Rain Clicks (nº of interrupts)
#ifdef ENABLE_INA
void setBatteryINA(float value); // Set Weather Record Battery INA (V)
float getBatteryINA(); // Return Weather Record Battery INA (V)
void setMaxCurrent(float value); // Set Weather Record Max Current (mA)
float getMaxCurrent(); // Return Weather Record Max Current (mA)
void setMinCurrent(float value); // Set Weather Record Min Current (mA)
float getMinCurrent(); // Return Weather Record Min Current (mA)
#endif
//Public Variables
private:
//Private Functions
//Private Variables
float temperature;
float humidity;
float pressure;
float windDirection;
float windGust;
float windSpeed;
float amountRain;
float battery;
unsigned long rainClicks;
unsigned long windClicks;
#ifdef ENABLE_INA
float batteryINA;
float maxCurrent;
float minCurrent;
#endif
};
#endif