From 62bcc67a8858f4d867ee8fe794b48785732316fb Mon Sep 17 00:00:00 2001 From: SybexX Date: Sat, 21 Dec 2024 23:40:03 +0100 Subject: [PATCH] Update ClassFlowCNNGeneral.cpp --- .../jomjol_flowcontroll/ClassFlowCNNGeneral.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp b/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp index 14ccc3b4d..af6f3b088 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowCNNGeneral.cpp @@ -95,8 +95,17 @@ string ClassFlowCNNGeneral::getReadout(int _analog = 0, bool _extendedResolution else { prev = PointerEvalHybridNew(GENERAL[_analog]->ROI[GENERAL[_analog]->ROI.size() - 1]->result_float, prev, prev); } - result = std::to_string(prev); - LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "getReadout(dig100) prev=" + std::to_string(prev)); + + if ((prev >= 0) && (prev < 10)) { + result = std::to_string(prev); + LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "getReadout(dig100) prev=" + std::to_string(prev)); + } + else { + result = "N"; + if (_extendedResolution && (CNNType != Digit)) { + result = "NN"; + } + } } } else {