Compare commits

...

2 Commits

Author SHA1 Message Date
SQFMI aaa3d91113
Merge pull request #202 from khenderick/feature/weather-source
Keep track on weather source
2022-12-29 18:34:06 -05:00
Kenneth Henderick f49e1a5fab
Keep track on whether weather data was fetched from external source 2022-12-29 14:08:24 +01:00
2 changed files with 3 additions and 0 deletions

View File

@ -618,6 +618,7 @@ weatherData Watchy::getWeatherData(String cityID, String units, String lang,
int(responseObject["weather"][0]["id"]);
currentWeather.weatherDescription =
JSONVar::stringify(responseObject["weather"][0]["main"]);
currentWeather.external = true;
// sync NTP during weather API call and use timezone of city
syncNTP(long(responseObject["timezone"]));
} else {
@ -634,6 +635,7 @@ weatherData Watchy::getWeatherData(String cityID, String units, String lang,
}
currentWeather.temperature = temperature;
currentWeather.weatherConditionCode = 800;
currentWeather.external = false;
}
weatherIntervalCounter = 0;
} else {

View File

@ -22,6 +22,7 @@ typedef struct weatherData {
int16_t weatherConditionCode;
bool isMetric;
String weatherDescription;
bool external;
} weatherData;
typedef struct watchySettings {