use live weather data #16
parent
191338aa3a
commit
1cfba3c284
@ -1 +1 @@
|
||||
{"coord":{"lon":13.04,"lat":47.8},"weather":[{"id":803,"main":"Clouds","description":"Überwiegend bewölkt","icon":"04d"}],"base":"stations","main":{"temp":282.55,"feels_like":276.58,"temp_min":279.26,"temp_max":285.15,"pressure":1000,"humidity":61},"visibility":10000,"wind":{"speed":6.2,"deg":140,"gust":11.8},"clouds":{"all":75},"dt":1582986835,"sys":{"type":1,"id":6877,"country":"AT","sunrise":1582955413,"sunset":1582995046},"timezone":3600,"id":2766824,"name":"Salzburg","cod":200}
|
||||
{"coord":{"lon":13.04,"lat":47.8},"weather":[{"id":520,"main":"Rain","description":"Leichter Regenschauer","icon":"09d"}],"base":"stations","main":{"temp":3.72,"feels_like":-0.89,"temp_min":2.22,"temp_max":5.56,"pressure":1019,"humidity":86},"visibility":10000,"wind":{"speed":4.1,"deg":290},"clouds":{"all":75},"dt":1583595650,"sys":{"type":1,"id":6877,"country":"AT","sunrise":1583559395,"sunset":1583600476},"timezone":3600,"id":2766824,"name":"Salzburg","cod":200}
|
@ -1 +1 @@
|
||||
{"cod":"200","message":0,"cnt":3,"list":[{"dt":1582988400,"main":{"temp":281.77,"feels_like":277.27,"temp_min":281.77,"temp_max":282.14,"pressure":1004,"sea_level":1004,"grnd_level":944,"humidity":61,"temp_kf":-0.37},"weather":[{"id":804,"main":"Clouds","description":"Bedeckt","icon":"04d"}],"clouds":{"all":100},"wind":{"speed":3.93,"deg":154},"sys":{"pod":"d"},"dt_txt":"2020-02-29 15:00:00"},{"dt":1582999200,"main":{"temp":277.8,"feels_like":274.11,"temp_min":277.8,"temp_max":278.08,"pressure":1005,"sea_level":1005,"grnd_level":946,"humidity":80,"temp_kf":-0.28},"weather":[{"id":804,"main":"Clouds","description":"Bedeckt","icon":"04n"}],"clouds":{"all":100},"wind":{"speed":2.77,"deg":164},"sys":{"pod":"n"},"dt_txt":"2020-02-29 18:00:00"},{"dt":1583010000,"main":{"temp":275.73,"feels_like":271.41,"temp_min":275.73,"temp_max":275.91,"pressure":1006,"sea_level":1006,"grnd_level":946,"humidity":66,"temp_kf":-0.18},"weather":[{"id":804,"main":"Clouds","description":"Bedeckt","icon":"04n"}],"clouds":{"all":100},"wind":{"speed":2.74,"deg":174},"sys":{"pod":"n"},"dt_txt":"2020-02-29 21:00:00"}],"city":{"id":2766824,"name":"Salzburg","coord":{"lat":47.7994,"lon":13.044},"country":"AT","timezone":3600,"sunrise":1582955412,"sunset":1582995045}}
|
||||
{"city":{"id":2766824,"name":"Salzburg","coord":{"lon":13.044,"lat":47.7994},"country":"AT","population":0,"timezone":3600},"cod":"200","message":0.0756077,"cnt":3,"list":[{"dt":1583578800,"sunrise":1583559394,"sunset":1583600475,"temp":{"day":276.7,"min":273.5,"max":276.7,"night":273.5,"eve":274.74,"morn":276.7},"feels_like":{"day":271.93,"night":269.99,"eve":271.06,"morn":271.93},"pressure":1018,"humidity":75,"weather":[{"id":600,"main":"Snow","description":"Mäßiger Schnee","icon":"13d"}],"speed":3.89,"deg":274,"clouds":100,"rain":2.38,"snow":0.31},{"dt":1583665200,"sunrise":1583645675,"sunset":1583686964,"temp":{"day":281.7,"min":272.09,"max":281.7,"night":275.81,"eve":276.57,"morn":272.09},"feels_like":{"day":279.03,"night":272.32,"eve":273.21,"morn":268.74},"pressure":1021,"humidity":53,"weather":[{"id":801,"main":"Clouds","description":"Ein paar Wolken","icon":"02d"}],"speed":0.88,"deg":259,"clouds":24},{"dt":1583751600,"sunrise":1583731955,"sunset":1583773453,"temp":{"day":276.82,"min":274.09,"max":277.7,"night":274.09,"eve":276.3,"morn":275.27},"feels_like":{"day":272.12,"night":270.38,"eve":272.51,"morn":272.04},"pressure":1016,"humidity":97,"weather":[{"id":501,"main":"Rain","description":"Mäßiger Regen","icon":"10d"}],"speed":4.63,"deg":250,"clouds":100,"rain":5.57}]}
|
@ -1,26 +1,41 @@
|
||||
#ifndef FACE_WEATHER_H
|
||||
#define FACE_WEATHER_H
|
||||
|
||||
// TODO
|
||||
struct faceWeatherData
|
||||
{
|
||||
//char hostname[64];
|
||||
//int port;
|
||||
// global
|
||||
char location[20];
|
||||
|
||||
// current condition
|
||||
char current_icon[4];
|
||||
char current_description[20];
|
||||
int current_temp;
|
||||
int current_min;
|
||||
int current_max;
|
||||
|
||||
char location[20];
|
||||
// forecast +1 (tomorrow)
|
||||
char forecast_1_icon[4];
|
||||
int forecast_1_min;
|
||||
int forecast_1_max;
|
||||
|
||||
// current
|
||||
int current_temp;
|
||||
int today_min;
|
||||
int today_max;
|
||||
// forecast +2
|
||||
char forecast_2_icon[4];
|
||||
int forecast_2_min;
|
||||
int forecast_2_max;
|
||||
|
||||
// forecast +3
|
||||
char forecast_3_icon[4];
|
||||
int forecast_3_min;
|
||||
int forecast_3_max;
|
||||
|
||||
// forecast
|
||||
// forecast +4
|
||||
char forecast_4_icon[4];
|
||||
int forecast_4_min;
|
||||
int forecast_4_max;
|
||||
};
|
||||
|
||||
void setupFaceWeather();
|
||||
void loopFaceWeather();
|
||||
|
||||
bool updateWeatherData();
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue