Merge pull request #1177 from haverland/minor_negative_accept

accept minor negative values if extended resolution is enabled
This commit is contained in:
jomjol
2022-10-15 16:53:29 +02:00
committed by GitHub
3 changed files with 14 additions and 7 deletions

View File

@@ -739,12 +739,18 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
if (!NUMBERS[j]->AllowNegativeRates)
{
if (NUMBERS[j]->Value < NUMBERS[j]->PreValue)
if ((NUMBERS[j]->Value < NUMBERS[j]->PreValue))
{
NUMBERS[j]->ErrorMessageText = NUMBERS[j]->ErrorMessageText + "Neg. Rate - Read: " + zwvalue + " - Raw: " + NUMBERS[j]->ReturnRawValue + " - Pre: " + RundeOutput(NUMBERS[j]->PreValue, NUMBERS[j]->Nachkomma) + " ";
NUMBERS[j]->Value = NUMBERS[j]->PreValue;
NUMBERS[j]->ReturnValue = "";
continue;
// Bei isExtendedResolution Ungenauigkeit von 0.2 mit einrechnen.
if (NUMBERS[j]->Value < (NUMBERS[j]->PreValue-0.2) && NUMBERS[j]->isExtendedResolution) {
NUMBERS[j]->Value = NUMBERS[j]->PreValue;
} else {
NUMBERS[j]->ErrorMessageText = NUMBERS[j]->ErrorMessageText + "Neg. Rate - Read: " + zwvalue + " - Raw: " + NUMBERS[j]->ReturnRawValue + " - Pre: " + RundeOutput(NUMBERS[j]->PreValue, NUMBERS[j]->Nachkomma) + " ";
NUMBERS[j]->Value = NUMBERS[j]->PreValue;
NUMBERS[j]->ReturnValue = "";
continue;
}
}
}
#ifdef SERIAL_DEBUG