Rolling 20211212

This commit is contained in:
jomjol
2021-12-12 19:30:07 +01:00
parent 4136a7b372
commit 61bf536207
12 changed files with 70 additions and 25 deletions

View File

@@ -637,10 +637,17 @@ string ClassFlowControll::getJSON()
{
json += "\"" + (*NUMBERS)[i]->name + "\":\n";
json += " {\n";
json += " \"value\": " + (*NUMBERS)[i]->ReturnValueNoError + ",\n";
if ((*NUMBERS)[i]->ReturnValueNoError.length() > 0)
json += " \"value\": " + (*NUMBERS)[i]->ReturnValueNoError + ",\n";
else
json += " \"value\": \"\",\n";
json += " \"raw\": \"" + (*NUMBERS)[i]->ReturnRawValue + "\",\n";
json += " \"error\": \"" + (*NUMBERS)[i]->ErrorMessageText + "\",\n";
json += " \"rate\": " + std::to_string((*NUMBERS)[i]->FlowRateAct) + ",\n";
if ((*NUMBERS)[i]->ReturnRateValue.length() > 0)
json += " \"rate\": " + (*NUMBERS)[i]->ReturnRateValue + ",\n";
else
json += " \"rate\": \"\",\n";
json += " \"timestamp\": \"" + (*NUMBERS)[i]->timeStamp + "\"\n";
if ((i+1) < (*NUMBERS).size())
json += " },\n";