Skip to content

Commit

Permalink
Update OswAppWeatherEncoder.cpp
Browse files Browse the repository at this point in the history
Warnings
  • Loading branch information
Lorenzosciacca authored Dec 17, 2023
1 parent f8a0333 commit eb9f9a7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/apps/_experiments/OswAppWeatherEncoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ bool OswAppWeatherEncoder::setUpdate(OswAppWeather::weather_update_t update) {
bool update_ok = true;
if(update.temp > 99 || update.temp < -99 ) {
OSW_LOG_W("ERROR TEMP");
OSW_LOG_I(update.temp);
OSW_LOG_W(update.temp);
update_ok = false;
}
if(update.humidity > 100 || update.humidity < 0) {
OSW_LOG_W("ERROR HUMIDITY");
OSW_LOG_I(update.humidity);
OSW_LOG_W(update.humidity);
update_ok = false;
}
if(update.pressure < 0 || update.pressure > 2000 ) {
OSW_LOG_W("ERROR PRESSURE");
OSW_LOG_I(update.pressure);
OSW_LOG_W(update.pressure);
update_ok = false;
}
if(update.weather < 0 || update.weather > 15) {
OSW_LOG_I(update.weather);
OSW_LOG_W(update.weather);
OSW_LOG_W("ERROR WEATHER");
update_ok = false;
}
Expand Down

0 comments on commit eb9f9a7

Please sign in to comment.