|
@@ -594,7 +594,10 @@ bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph)
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- InitNUMBERS();
|
|
|
|
|
|
|
+ if (!InitNUMBERS()) {
|
|
|
|
|
+ LogFile.WriteToFile(ESP_LOG_ERROR, TAG, "Post-processing initialization failed; skipping PreValue loading");
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
while (this->getNextLine(pfile, &aktparamgraph) && !this->isNewParagraph(aktparamgraph)) {
|
|
while (this->getNextLine(pfile, &aktparamgraph) && !this->isNewParagraph(aktparamgraph)) {
|
|
|
splitted = ZerlegeZeile(aktparamgraph);
|
|
splitted = ZerlegeZeile(aktparamgraph);
|
|
@@ -669,7 +672,7 @@ ClassFlowPostProcessing::~ClassFlowPostProcessing() {
|
|
|
NUMBERS.clear();
|
|
NUMBERS.clear();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void ClassFlowPostProcessing::InitNUMBERS() {
|
|
|
|
|
|
|
+bool ClassFlowPostProcessing::InitNUMBERS() {
|
|
|
// The configuration can be reloaded; release any previous per-number state first.
|
|
// The configuration can be reloaded; release any previous per-number state first.
|
|
|
for (NumberPost* number : NUMBERS) {
|
|
for (NumberPost* number : NUMBERS) {
|
|
|
delete number;
|
|
delete number;
|
|
@@ -700,7 +703,7 @@ void ClassFlowPostProcessing::InitNUMBERS() {
|
|
|
delete number;
|
|
delete number;
|
|
|
}
|
|
}
|
|
|
NUMBERS.clear();
|
|
NUMBERS.clear();
|
|
|
- return;
|
|
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
_number->name = name_numbers[_num];
|
|
_number->name = name_numbers[_num];
|
|
@@ -761,6 +764,7 @@ void ClassFlowPostProcessing::InitNUMBERS() {
|
|
|
for (int i = 0; i < NUMBERS.size(); ++i) {
|
|
for (int i = 0; i < NUMBERS.size(); ++i) {
|
|
|
ESP_LOGD(TAG, "Number %s, Anz DIG: %d, Anz ANA %d", NUMBERS[i]->name.c_str(), NUMBERS[i]->AnzahlDigit, NUMBERS[i]->AnzahlAnalog);
|
|
ESP_LOGD(TAG, "Number %s, Anz DIG: %d, Anz ANA %d", NUMBERS[i]->name.c_str(), NUMBERS[i]->AnzahlDigit, NUMBERS[i]->AnzahlAnalog);
|
|
|
}
|
|
}
|
|
|
|
|
+ return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
string ClassFlowPostProcessing::ShiftDecimal(string in, int _decShift) {
|
|
string ClassFlowPostProcessing::ShiftDecimal(string in, int _decShift) {
|