mirror of https://github.com/sqfmi/Watchy.git
Compare commits
6 Commits
ef0534e92b
...
e5556cb700
Author | SHA1 | Date |
---|---|---|
sqfmi | e5556cb700 | |
SQFMI | 83aada6452 | |
Sukhpal Singh | 3a7eff4a8e | |
SQFMI | aaa3d91113 | |
Kenneth Henderick | f49e1a5fab | |
Sukhpal Singh | 9ac9aeded9 |
|
@ -640,6 +640,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
|
||||
gmtOffset = int(responseObject["timezone"]);
|
||||
syncNTP(gmtOffset);
|
||||
|
@ -657,6 +658,7 @@ weatherData Watchy::getWeatherData(String cityID, String units, String lang,
|
|||
}
|
||||
currentWeather.temperature = temperature;
|
||||
currentWeather.weatherConditionCode = 800;
|
||||
currentWeather.external = false;
|
||||
}
|
||||
weatherIntervalCounter = 0;
|
||||
} else {
|
||||
|
@ -807,6 +809,8 @@ void Watchy::setupWifi() {
|
|||
} else {
|
||||
display.println("Connected to");
|
||||
display.println(WiFi.SSID());
|
||||
display.println("Local IP:");
|
||||
display.println(WiFi.localIP());
|
||||
}
|
||||
display.display(false); // full refresh
|
||||
// turn off radios
|
||||
|
@ -828,6 +832,8 @@ void Watchy::_configModeCallback(WiFiManager *myWiFiManager) {
|
|||
display.println(WIFI_AP_SSID);
|
||||
display.print("IP: ");
|
||||
display.println(WiFi.softAPIP());
|
||||
display.println("MAC address:");
|
||||
display.println(WiFi.softAPmacAddress().c_str());
|
||||
display.display(false); // full refresh
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ typedef struct weatherData {
|
|||
int16_t weatherConditionCode;
|
||||
bool isMetric;
|
||||
String weatherDescription;
|
||||
bool external;
|
||||
} weatherData;
|
||||
|
||||
typedef struct watchySettings {
|
||||
|
|
Loading…
Reference in New Issue