fixed some bugs, check @ real system

This commit is contained in:
2026-05-14 16:23:43 +03:00
parent a31d809c2e
commit bb2af2965a
18 changed files with 135 additions and 81 deletions

View File

@@ -27,10 +27,11 @@ int main() {
struct tm *T = localtime(&wd.last_update);
strftime(strt, 63, "%F %T", T);
printf("Windmax=%.1f\nRain=%d\nClouds=%.1f\nWind=%.1f\nExttemp=%.1f\n"
"Pres=%.1f\nHumid=%.1f\nMeteo=local\nForceOFF=%d\n",
"Pres=%.1f\nHumid=%.1f\nMeteo=local\nForceOFF=%d\nWeather=%d\nWeatherTime=%d [%s]\n",
wd.windmax, wd.rain, wd.clouds, wd.wind, wd.exttemp,
wd.pressure, wd.humidity, wd.forceoff);
wd.pressure, wd.humidity, wd.forceoff, (int)wd.weather, (int)wd.last_update, strt);
if(!wd.forceoff) errcode = wd.weather;
if(time(NULL) - wd.last_update > 30) errcode = 3;
}else{
fprintf(stderr, "Failed to get weather data\n");
}