saving works kinda

This commit is contained in:
richonguzman 2024-05-13 16:08:27 -04:00
parent 1345ddd608
commit 6ecb733bea
2 changed files with 10 additions and 3 deletions

View file

@ -841,7 +841,7 @@
</div>
</div>
</div>
<div class="col-lg-9 col-sm-12">
<div class="row mt-3">
<div class="col-12">
<label for="bme.heightCorrection" class="form-label"
>Heigh Correction</label
@ -850,8 +850,10 @@
type="number"
name="bme.heightCorrection"
id="bme.heightCorrection"
value="0"
placeholder="0"
class="form-control"
step="1"
min="0"
/>
<span class="input-group-text"
>meters</span
@ -865,8 +867,11 @@
type="number"
name="bme.temperatureCorrection"
id="bme.temperatureCorrection"
value="0.0"
placeholder="0.0"
class="form-control"
step="0.1"
min="-5"
max="5"
/>
<span class="input-group-text"
>C°</span

View file

@ -151,6 +151,8 @@ namespace WEB_Utils {
}
Config.bme.active = request->hasParam("bme.active", true);
Config.bme.heightCorrection = request->getParam("bme.heightCorrection", true)->value().toInt();
Config.bme.temperatureCorrection = request->getParam("bme.temperatureCorrection", true)->value().toFloat();
Config.ota.username = request->getParam("ota.username", true)->value();
Config.ota.password = request->getParam("ota.password", true)->value();