correct version parsing

and float conversion of percent value
This commit is contained in:
lukas 2021-03-06 14:39:32 +01:00
parent 3b502ac434
commit 62cea9932e
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ build:
stage: build
script:
- "platformio run -e esp12e"
- vers=$(grep -Po '[0-9]*\.[0-9]*\.[0-9]*(?=\")' ./src/Pins.h)
- vers=$(grep -Po '[0-9]+\.[0-9]+\.[0-9]+[-0-9A-Za-z]*(?=\")' ./src/Pins.h)
- mv .pio/build/esp12e/*.bin Pumpensteuerung-${vers}.bin
artifacts:
paths:

View File

@ -30,7 +30,7 @@ void HeatingInfoService::reply(AsyncWebServerRequest *request) {
root["lastheatduration"] = lastheating == 0 ? 0 : lastheatend == 0 ? -1 : lastheatend - lastheating;
root["totalheattime"] = this->totalHeatTime;
root["heattimepercent"] = this->totalHeatTime / Timer::getSystemSeconds();
root["heattimepercent"] = (float)this->totalHeatTime / (float)Timer::getSystemSeconds();
response->setLength();
request->send(response);