Skip to content

Commit

Permalink
Merge pull request #44 from thorrak/tilt_pro
Browse files Browse the repository at this point in the history
Fix a bug when setting the smoothing factor
  • Loading branch information
thorrak committed Dec 22, 2020
2 parents 9d96f71 + 3da79c5 commit 42adac7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Binary file modified bin/d32_pro_tft_firmware.bin
Binary file not shown.
Binary file modified bin/lcd_ssd1306_firmware.bin
Binary file not shown.
Binary file modified bin/tft_espi_firmware.bin
Binary file not shown.
10 changes: 6 additions & 4 deletions src/http_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,12 @@ void processConfig() {
int sf;
bool is_int;
isInteger(server.arg("smoothFactor").c_str(),is_int,sf);
if (is_int && (sf != app_config.config["smoothFactor"].get<int>()) && sf >= 0 && sf <= 99) {
app_config.config["smoothFactor"] = sf;
} else {
all_settings_valid = false;
if (sf != app_config.config["smoothFactor"].get<int>()) {
if (is_int && sf >= 0 && sf <= 99) {
app_config.config["smoothFactor"] = sf;
} else {
all_settings_valid = false;
}
}
}

Expand Down

0 comments on commit 42adac7

Please sign in to comment.