|
@@ -758,17 +758,8 @@ string ClassFlowPostProcessing::ShiftDecimal(string in, int _decShift) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
bool ClassFlowPostProcessing::doFlow(string zwtime) {
|
|
bool ClassFlowPostProcessing::doFlow(string zwtime) {
|
|
|
- string result = "";
|
|
|
|
|
- string digit = "";
|
|
|
|
|
- string analog = "";
|
|
|
|
|
string zwvalue;
|
|
string zwvalue;
|
|
|
- string zw;
|
|
|
|
|
- time_t imagetime = 0;
|
|
|
|
|
- string rohwert;
|
|
|
|
|
-
|
|
|
|
|
- // Update decimal point, as the decimal places can also change when changing from CNNType Auto --> xyz:
|
|
|
|
|
-
|
|
|
|
|
- imagetime = flowTakeImage->getTimeImageTaken();
|
|
|
|
|
|
|
+ time_t imagetime = flowTakeImage->getTimeImageTaken();
|
|
|
|
|
|
|
|
if (imagetime == 0) {
|
|
if (imagetime == 0) {
|
|
|
time(&imagetime);
|
|
time(&imagetime);
|
|
@@ -794,6 +785,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) {
|
|
|
// double LastValueTimeDifference = difftime(imagetime, NUMBERS[j]->timeStampLastValue); // in seconds
|
|
// double LastValueTimeDifference = difftime(imagetime, NUMBERS[j]->timeStampLastValue); // in seconds
|
|
|
double LastPreValueTimeDifference = difftime(imagetime, NUMBERS[j]->timeStampLastPreValue); // in seconds
|
|
double LastPreValueTimeDifference = difftime(imagetime, NUMBERS[j]->timeStampLastPreValue); // in seconds
|
|
|
|
|
|
|
|
|
|
+ // Update decimal point, as the decimal places can also change when changing from CNNType Auto --> xyz:
|
|
|
UpdateNachkommaDecimalShift();
|
|
UpdateNachkommaDecimalShift();
|
|
|
|
|
|
|
|
int previous_value = -1;
|
|
int previous_value = -1;
|
|
@@ -884,12 +876,15 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) {
|
|
|
|
|
|
|
|
if (NUMBERS[j]->checkDigitIncreaseConsistency) {
|
|
if (NUMBERS[j]->checkDigitIncreaseConsistency) {
|
|
|
if (flowDigit) {
|
|
if (flowDigit) {
|
|
|
|
|
+ LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "Before checkDigitConsistency: value=" + std::to_string(NUMBERS[j]->Value));
|
|
|
NUMBERS[j]->Value = checkDigitConsistency(NUMBERS[j]->Value, NUMBERS[j]->DecimalShift, NUMBERS[j]->analog_roi != NULL, NUMBERS[j]->PreValue);
|
|
NUMBERS[j]->Value = checkDigitConsistency(NUMBERS[j]->Value, NUMBERS[j]->DecimalShift, NUMBERS[j]->analog_roi != NULL, NUMBERS[j]->PreValue);
|
|
|
|
|
+ LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "After checkDigitConsistency: value=" + std::to_string(NUMBERS[j]->Value));
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- #ifdef SERIAL_DEBUG
|
|
|
|
|
- ESP_LOGD(TAG, "checkDigitIncreaseConsistency = true - no digit numbers defined!");
|
|
|
|
|
- #endif
|
|
|
|
|
|
|
+ #ifdef SERIAL_DEBUG
|
|
|
|
|
+ ESP_LOGD(TAG, "checkDigitIncreaseConsistency = true - no digit numbers defined!");
|
|
|
|
|
+ #endif
|
|
|
|
|
+ LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "checkDigitIncreaseConsistency = true - no digit numbers defined!");
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1128,6 +1123,7 @@ float ClassFlowPostProcessing::checkDigitConsistency(double input, int _decilams
|
|
|
#ifdef SERIAL_DEBUG
|
|
#ifdef SERIAL_DEBUG
|
|
|
ESP_LOGD(TAG, "checkDigitConsistency: pot=%d, decimalshift=%d", pot, _decilamshift);
|
|
ESP_LOGD(TAG, "checkDigitConsistency: pot=%d, decimalshift=%d", pot, _decilamshift);
|
|
|
#endif
|
|
#endif
|
|
|
|
|
+ LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "checkDigitConsistency: pot=" + std::to_string(pot) + ", decimalshift=" + std::to_string(_decilamshift));
|
|
|
|
|
|
|
|
pot_max = ((int) log10(input)) + 1;
|
|
pot_max = ((int) log10(input)) + 1;
|
|
|
|
|
|
|
@@ -1159,6 +1155,7 @@ float ClassFlowPostProcessing::checkDigitConsistency(double input, int _decilams
|
|
|
#ifdef SERIAL_DEBUG
|
|
#ifdef SERIAL_DEBUG
|
|
|
ESP_LOGD(TAG, "checkDigitConsistency: input=%f", input);
|
|
ESP_LOGD(TAG, "checkDigitConsistency: input=%f", input);
|
|
|
#endif
|
|
#endif
|
|
|
|
|
+ LogFile.WriteToFile(ESP_LOG_DEBUG, TAG, "checkDigitConsistency: input=" + std::to_string(input));
|
|
|
|
|
|
|
|
pot++;
|
|
pot++;
|
|
|
}
|
|
}
|