bme autodetect

This commit is contained in:
richonguzman 2024-05-13 14:00:07 -04:00
parent 7753618756
commit f1e712a363
7 changed files with 149 additions and 104 deletions

View file

@ -92,6 +92,8 @@ void Configuration::writeFile() {
data["syslog"]["port"] = syslog.port;
data["bme"]["active"] = bme.active;
data["bme"]["heightCorrection"] = bme.heightCorrection;
data["bme"]["temperatureCorrection"] = bme.temperatureCorrection;
data["ota"]["username"] = ota.username;
data["ota"]["password"] = ota.password;
@ -155,6 +157,8 @@ bool Configuration::readFile() {
syslog.port = data["syslog"]["port"].as<int>();
bme.active = data["bme"]["active"].as<bool>();
bme.heightCorrection = data["bme"]["heightCorrection"].as<int>();
bme.temperatureCorrection = data["bme"]["temperatureCorrection"].as<float>();
ota.username = data["ota"]["username"].as<String>();
ota.password = data["ota"]["password"].as<String>();
@ -325,6 +329,8 @@ void Configuration::init() {
syslog.port = 514;
bme.active = false;
bme.heightCorrection = 0;
bme.temperatureCorrection = 0.0;
ota.username = "";
ota.password = "";