forked from rszimm/sprinklers_pi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Weather.h
35 lines (31 loc) · 780 Bytes
/
Weather.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
// Weather.h
// This file manages the retrieval of Weather related information and adjustment of durations
// from Weather Underground
// Author: Richard Zimmerman
// Copyright (c) 2013 Richard Zimmerman
//
#ifndef _WEATHER_h
#define _WEATHER_h
#include "port.h"
class Weather
{
public:
struct ReturnVals
{
bool valid;
bool keynotfound;
short minhumidity;
short maxhumidity;
short meantempi;
short precip_today;
short precipi;
short windmph;
short UV;
};
public:
Weather(void);
int GetScale(const IPAddress & ip, const char * key, uint32_t zip, const char * pws, bool usePws) const;
int GetScale(const ReturnVals & vals) const;
ReturnVals GetVals(const IPAddress & ip, const char * key, uint32_t zip, const char * pws, bool usePws) const;
};
#endif