-
Notifications
You must be signed in to change notification settings - Fork 0
/
WeatherData.h
48 lines (42 loc) · 1.11 KB
/
WeatherData.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
// Copyright (c) 2014 Ben Kelley.
//
// MIT License http://opensource.org/licenses/MIT
#ifndef _WeatherData_h
#ifdef __cplusplus
#define _WeatherData_h
#define MAX_DATA_FIELDS 6
class WeatherData {
private:
int key[MAX_DATA_FIELDS];
int value[MAX_DATA_FIELDS];
bool dataIsSet[MAX_DATA_FIELDS];
int multiplier[MAX_DATA_FIELDS];
//char sensorName[16];
public:
enum {OUTDOOR_TEMP,
OUTDOOR_HUMIDITY,
WIND_SPEED,
WIND_GUST,
WIND_DIRECTION,
BATTERY_PERCENT,
RAIN_RATE,
RAIN_TOTAL,
// Pressure in hPa
BAROMETRIC_PRESSURE,
COMFORT,
FORECAST,
DEW_POINT,
INDOOR_TEMP,
INDOOR_HUMIDITY};
WeatherData();
int getDataAsInt(int field);
float getDataAsFloat(int field);
bool isSet(int field);
void setDataField(int field, int valueIn);
void setDataField(int field, float value, int multiplier);
void clearDataFields();
//void setSensorName(char *);
//char * getSensorName();
};
#endif
#endif