Compare commits

...

6 Commits

Author SHA1 Message Date
sqfmi e5556cb700 Merge branch 'dev' 2022-12-30 02:01:35 -05:00
SQFMI 83aada6452
Merge pull request #201 from sukhpalhub/wifi-feature
Issue #89 Added mac address and local ip
2022-12-30 01:57:52 -05:00
Sukhpal Singh 3a7eff4a8e Remove wifi setup guide from readme 2022-12-30 14:23:32 +10:00
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
Sukhpal Singh 9ac9aeded9 Issue #89 Added mac address and local ip
- Displayed mac address when setting up wifi
- Display local ip when wifi is connected from the setup
2022-12-28 01:12:48 +10:00
2 changed files with 7 additions and 0 deletions

View File

@ -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
}

View File

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