From 27fd8d792b6a0699d7db0d22171da55ec3ec3ea0 Mon Sep 17 00:00:00 2001 From: Duncan Brown Date: Tue, 2 Jun 2020 15:39:28 -0400 Subject: [PATCH] fixed error in string conversion --- src/http_server.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/http_server.cpp b/src/http_server.cpp index 4f52496..37f315c 100644 --- a/src/http_server.cpp +++ b/src/http_server.cpp @@ -172,15 +172,16 @@ void processConfig() { return processConfigError(); } - float tzoffset = strtof(server.arg("brewstatusTZoffset").c_str(), nullptr, 10); + float tzoffset = strtof(server.arg("brewstatusTZoffset").c_str(), nullptr); if(tzoffset < -12.0) { Serial.println("brewstatusTZoffset is less than -12!"); return processConfigError(); } else if(tzoffset > 12.0) { Serial.println("brewstatusTZoffset is greater than 12!"); return processConfigError(); - else + } else { app_config.config["brewstatusTZoffset"] = tzoffset; + } Serial.println("Updated brewstatusTZoffset"); }