mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-11 14:07:00 +03:00
Merge pull request #1177 from haverland/minor_negative_accept
accept minor negative values if extended resolution is enabled
This commit is contained in:
@@ -9,11 +9,12 @@
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Updated built environment to `espressif32@v5.2.0`
|
- Updated built environment to `espressif32@v5.2.0`
|
||||||
|
- [#1176](https://github.com/jomjol/AI-on-the-edge-device/discussions/1176) accept minor negative values (-0.2) if extended resolution is enabled
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- [#1116](https://github.com/jomjol/AI-on-the-edge-device/issues/1116) precision problem at setting prevalue
|
- [#1116](https://github.com/jomjol/AI-on-the-edge-device/issues/1116) precision problem at setting prevalue
|
||||||
- [#1119](https://github.com/jomjol/AI-on-the-edge-device/issues/1119) renamed `firmware.bin` not working in OTA
|
- [#1119](https://github.com/jomjol/AI-on-the-edge-device/issues/1119) renamed `firmware.bin` not working in OTA
|
||||||
|
- [#1143](https://github.com/jomjol/AI-on-the-edge-device/issues/1143) changed postprocess for analog->digit (lowest digit processing)
|
||||||
### Removed
|
### Removed
|
||||||
|
|
||||||
- n.a.
|
- n.a.
|
||||||
|
|||||||
@@ -739,12 +739,18 @@ bool ClassFlowPostProcessing::doFlow(string zwtime)
|
|||||||
|
|
||||||
if (!NUMBERS[j]->AllowNegativeRates)
|
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) + " ";
|
// Bei isExtendedResolution Ungenauigkeit von 0.2 mit einrechnen.
|
||||||
NUMBERS[j]->Value = NUMBERS[j]->PreValue;
|
if (NUMBERS[j]->Value < (NUMBERS[j]->PreValue-0.2) && NUMBERS[j]->isExtendedResolution) {
|
||||||
NUMBERS[j]->ReturnValue = "";
|
NUMBERS[j]->Value = NUMBERS[j]->PreValue;
|
||||||
continue;
|
} 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
|
#ifdef SERIAL_DEBUG
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ void test_doFlow() {
|
|||||||
result = process_doFlow(analogs, digits, Digital100, false, true, 0);
|
result = process_doFlow(analogs, digits, Digital100, false, true, 0);
|
||||||
TEST_ASSERT_EQUAL_STRING(expected_extended, result.c_str());
|
TEST_ASSERT_EQUAL_STRING(expected_extended, result.c_str());
|
||||||
|
|
||||||
// Fehler V12.0.1
|
// Fehler V11.3.0
|
||||||
// https://github.com/jomjol/AI-on-the-edge-device/issues/1143#issue-1400807695
|
// https://github.com/jomjol/AI-on-the-edge-device/issues/1143#issue-1400807695
|
||||||
digits = { 7.0, 4.0, 7.0, 2.0, 7.0, 5.4, 9.4}; // 7472.749 als falsches Ergebnis
|
digits = { 7.0, 4.0, 7.0, 2.0, 7.0, 5.4, 9.4}; // 7472.749 als falsches Ergebnis
|
||||||
analogs = {};
|
analogs = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user