From cd1165e547a362692f4765520c0fa4b8b06bc153 Mon Sep 17 00:00:00 2001 From: SybexX Date: Sat, 1 Mar 2025 00:09:11 +0100 Subject: [PATCH] IgnoreLeadingNaN fix (#3547) * test1 * test2 * Update edit_config_template.html * fix * Update NUMBER.CheckDigitIncreaseConsistency.md --------- Co-authored-by: CaCO3 --- .../ClassFlowDefineTypes.h | 5 +- .../ClassFlowPostProcessing.cpp | 45 +- .../ClassFlowPostProcessing.h | 10 +- param-docs/expert-params.txt | 1 - ...> NUMBER.CheckDigitIncreaseConsistency.md} | 3 + sd-card/html/edit_config_template.html | 3588 ++++++++--------- sd-card/html/readconfigparam.js | 33 +- 7 files changed, 1828 insertions(+), 1857 deletions(-) rename param-docs/parameter-pages/PostProcessing/{CheckDigitIncreaseConsistency.md => NUMBER.CheckDigitIncreaseConsistency.md} (57%) diff --git a/code/components/jomjol_flowcontroll/ClassFlowDefineTypes.h b/code/components/jomjol_flowcontroll/ClassFlowDefineTypes.h index 466f92ef..7a2b82b1 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowDefineTypes.h +++ b/code/components/jomjol_flowcontroll/ClassFlowDefineTypes.h @@ -31,7 +31,6 @@ enum t_RateType { RateChange // time difference is considered and a normalized rate is used for comparison with NumberPost.maxRate }; - /** * Holds all properties and settings of a sequence. A sequence is a set of digit and/or analog ROIs that are combined to * provide one meter reading (value). @@ -45,6 +44,7 @@ struct NumberPost { int ChangeRateThreshold; // threshold parameter for negative rate detection bool PreValueOkay; // previousValueValid; indicates that the reading of the previous round has no errors bool AllowNegativeRates; // allowNegativeRate; defines if the consistency checks allow negative rates between consecutive meter readings. + bool IgnoreLeadingNaN; bool checkDigitIncreaseConsistency; // extendedConsistencyCheck; performs an additional consistency check to avoid wrong readings time_t timeStampLastValue; // Timestamp for the last read value; is used for the log time_t timeStampLastPreValue; // Timestamp for the last PreValue set; is used for useMaxRateValue @@ -66,7 +66,7 @@ struct NumberPost { float AnalogToDigitTransitionStart; // AnalogToDigitTransitionStartValue; FIXME: need a better description; When is the digit > x.1, i.e. when does it start to tilt? int Nachkomma; // decimalPlaces; usually defined by the number of analog ROIs; affected by DecimalShift - string DomoticzIdx; // Domoticz counter Idx + string DomoticzIdx; // Domoticz counter Idx string FieldV1; // influxdbFieldName_v1; Name of the Field in InfluxDBv1 string MeasurementV1; // influxdbMeasurementName_v1; Name of the Measurement in InfluxDBv1 @@ -83,4 +83,3 @@ struct NumberPost { }; #endif - diff --git a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp index d16e9d43..99337ea8 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp +++ b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.cpp @@ -320,7 +320,6 @@ ClassFlowPostProcessing::ClassFlowPostProcessing(std::vector* lfc, C ListFlowControll = lfc; flowTakeImage = NULL; UpdatePreValueINI = false; - IgnoreLeadingNaN = false; flowAnalog = _analog; flowDigit = _digit; @@ -431,6 +430,27 @@ void ClassFlowPostProcessing::handleAllowNegativeRate(string _decsep, string _va } } +void ClassFlowPostProcessing::handleIgnoreLeadingNaN(string _decsep, string _value) { + string _digit, _decpos; + int _pospunkt = _decsep.find_first_of("."); + + if (_pospunkt > -1) { + _digit = _decsep.substr(0, _pospunkt); + } + else { + _digit = "default"; + } + + for (int j = 0; j < NUMBERS.size(); ++j) { + bool _zwdc = alphanumericToBoolean(_value); + + // Set to default first (if nothing else is set) + if ((_digit == "default") || (NUMBERS[j]->name == _digit)) { + NUMBERS[j]->IgnoreLeadingNaN = _zwdc; + } + } +} + void ClassFlowPostProcessing::handleMaxRateType(string _decsep, string _value) { string _digit, _decpos; int _pospunkt = _decsep.find_first_of("."); @@ -509,7 +529,7 @@ void ClassFlowPostProcessing::handleChangeRateThreshold(string _decsep, string _ } } } -/* + void ClassFlowPostProcessing::handlecheckDigitIncreaseConsistency(std::string _decsep, std::string _value) { std::string _digit; @@ -532,7 +552,7 @@ void ClassFlowPostProcessing::handlecheckDigitIncreaseConsistency(std::string _d } } } -*/ + bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph) { std::vector splitted; int _n; @@ -585,12 +605,7 @@ bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph) } if ((toUpper(_param) == "CHECKDIGITINCREASECONSISTENCY") && (splitted.size() > 1)) { - // handlecheckDigitIncreaseConsistency(splitted[0], splitted[1]); - if (alphanumericToBoolean(splitted[1])) { - for (_n = 0; _n < NUMBERS.size(); ++_n) { - NUMBERS[_n]->checkDigitIncreaseConsistency = true; - } - } + handlecheckDigitIncreaseConsistency(splitted[0], splitted[1]); } if ((toUpper(_param) == "ALLOWNEGATIVERATES") && (splitted.size() > 1)) { @@ -602,7 +617,7 @@ bool ClassFlowPostProcessing::ReadParameter(FILE* pfile, string& aktparamgraph) } if ((toUpper(_param) == "IGNORELEADINGNAN") && (splitted.size() > 1)) { - IgnoreLeadingNaN = alphanumericToBoolean(splitted[1]); + handleIgnoreLeadingNaN(splitted[0], splitted[1]); } if ((toUpper(_param) == "PREVALUEAGESTARTUP") && (splitted.size() > 1)) { @@ -670,6 +685,7 @@ void ClassFlowPostProcessing::InitNUMBERS() { _number->FlowRateAct = 0; // m3 / min _number->PreValueOkay = false; _number->AllowNegativeRates = false; + _number->IgnoreLeadingNaN = false; _number->MaxRateValue = 0.1; _number->MaxRateType = AbsoluteChange; _number->useMaxRateValue = false; @@ -821,7 +837,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) { ESP_LOGD(TAG, "After ShiftDecimal: ReturnRaw %s", NUMBERS[j]->ReturnRawValue.c_str()); #endif - if (IgnoreLeadingNaN) { + if (NUMBERS[j]->IgnoreLeadingNaN) { while ((NUMBERS[j]->ReturnRawValue.length() > 1) && (NUMBERS[j]->ReturnRawValue[0] == 'N')) { NUMBERS[j]->ReturnRawValue.erase(0, 1); } @@ -868,12 +884,7 @@ bool ClassFlowPostProcessing::doFlow(string zwtime) { if (NUMBERS[j]->checkDigitIncreaseConsistency) { if (flowDigit) { - if (flowDigit->getCNNType() != Digit) { - ESP_LOGD(TAG, "checkDigitIncreaseConsistency = true - ignored due to wrong CNN-Type (not Digit Classification)"); - } - else { - 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); } else { #ifdef SERIAL_DEBUG diff --git a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h index e16aa618..24d58693 100644 --- a/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h +++ b/code/components/jomjol_flowcontroll/ClassFlowPostProcessing.h @@ -10,7 +10,6 @@ #include - class ClassFlowPostProcessing : public ClassFlow { @@ -19,8 +18,7 @@ protected: int PreValueAgeStartup; bool ErrorMessage; - bool IgnoreLeadingNaN; // SPECIAL CASE for User Gustl ??? - + ClassFlowCNNGeneral* flowAnalog; ClassFlowCNNGeneral* flowDigit; @@ -35,15 +33,16 @@ protected: float checkDigitConsistency(double input, int _decilamshift, bool _isanalog, double _preValue); void InitNUMBERS(); + void handleDecimalSeparator(string _decsep, string _value); void handleMaxRateValue(string _decsep, string _value); void handleDecimalExtendedResolution(string _decsep, string _value); void handleMaxRateType(string _decsep, string _value); void handleAnalogToDigitTransitionStart(string _decsep, string _value); void handleAllowNegativeRate(string _decsep, string _value); + void handleIgnoreLeadingNaN(string _decsep, string _value); void handleChangeRateThreshold(string _decsep, string _value); - - std::string GetStringReadouts(general); + void handlecheckDigitIncreaseConsistency(std::string _decsep, std::string _value); void WriteDataLog(int _index); @@ -75,5 +74,4 @@ public: string name(){return "ClassFlowPostProcessing";}; }; - #endif //CLASSFFLOWPOSTPROCESSING_H diff --git a/param-docs/expert-params.txt b/param-docs/expert-params.txt index 5f47bca9..f5317096 100644 --- a/param-docs/expert-params.txt +++ b/param-docs/expert-params.txt @@ -31,7 +31,6 @@ AlignmentAlgo CNNGoodThreshold PreValueAgeStartup ErrorMessage -CheckDigitIncreaseConsistency IO0 IO1 IO3 diff --git a/param-docs/parameter-pages/PostProcessing/CheckDigitIncreaseConsistency.md b/param-docs/parameter-pages/PostProcessing/NUMBER.CheckDigitIncreaseConsistency.md similarity index 57% rename from param-docs/parameter-pages/PostProcessing/CheckDigitIncreaseConsistency.md rename to param-docs/parameter-pages/PostProcessing/NUMBER.CheckDigitIncreaseConsistency.md index 8612cd14..c5682fbd 100644 --- a/param-docs/parameter-pages/PostProcessing/CheckDigitIncreaseConsistency.md +++ b/param-docs/parameter-pages/PostProcessing/NUMBER.CheckDigitIncreaseConsistency.md @@ -6,3 +6,6 @@ Default Value: `false` An additional consistency check. It especially improves the zero crossing check between digits. + +!!! Note + This parameter must be prefixed with `` followed by a dot (eg. `main.CheckDigitIncreaseConsistency`). `` is the name of the number sequence defined in the ROI's. diff --git a/sd-card/html/edit_config_template.html b/sd-card/html/edit_config_template.html index 7176c72d..7da7c409 100644 --- a/sd-card/html/edit_config_template.html +++ b/sd-card/html/edit_config_template.html @@ -2,7 +2,7 @@ - + Configuration @@ -215,1919 +215,1910 @@
-

Configuration

+

Configuration

-
+
CLICK HERE for usage description. More infos in documentation: Parameter -

- This page lists all available configuration parameters of the device.
- The description of each parameter can be shown by hovering over or by clicking the icon. -

-

- The page gets opened with the default view which should be sufficient for regular configuration tasks. Enabling the "Show Expert Parameters" - some expert parameters (light red background color) will be added to the parameter list. Additionally the button "Edit "Config.ini" File" - to edit the underlaying configuration file (config.ini) manually is now shown on top of the page. This function should be only used for special cases. -

-

- Sections (entire functionality) or single parameters having a checkbox can be enabled or disabled. - Disabling a complete section results in a disabled functionality. Whenever only a single parameter of a section is disabled - the hard-coded default value is used for the disabled parameter. -

-

- Don't forget to save the changes with the button "Save Config" at the bottom of this page.
- -

+

+ This page lists all available configuration parameters of the device.
+ The description of each parameter can be shown by hovering over or by clicking the icon. +

+

+ The page gets opened with the default view which should be sufficient for regular configuration tasks. Enabling the "Show Expert Parameters" + some expert parameters (light red background color) will be added to the parameter list. Additionally the button "Edit "Config.ini" File" + to edit the underlaying configuration file (config.ini) manually is now shown on top of the page. This function should be only used for special cases. +

+

+ Sections (entire functionality) or single parameters having a checkbox can be enabled or disabled. + Disabling a complete section results in a disabled functionality. Whenever only a single parameter of a section is disabled + the hard-coded default value is used for the disabled parameter. +

+

+ Don't forget to save the changes with the button "Save Config" at the bottom of this page.
+ +


- @@ -2240,7 +2231,7 @@ function InitIndivParameter() { optionInfluxv1.value = i; _indexInfluxv1.add(optionInfluxv1); - var optionMQTTIdx = document.createElement("option"); + var optionMQTTIdx = document.createElement("option"); optionMQTTIdx.text = NUMBERS[i]["name"]; optionMQTTIdx.value = i; _indexMQTTIdx.add(optionMQTTIdx); @@ -2249,7 +2240,7 @@ function InitIndivParameter() { _index.selectedIndex = 0; _indexInflux.selectedIndex = 0; _indexInfluxv1.selectedIndex = 0; - _indexMQTTIdx.selectedIndex = 0; + _indexMQTTIdx.selectedIndex = 0; } function UpdateInputIndividual(sel) { @@ -2264,6 +2255,7 @@ function UpdateInputIndividual(sel) { ReadParameter(param, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt); // ReadParameter(param, "PostProcessing", "IgnoreAllNaN", false, NUNBERSAkt); ReadParameter(param, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt); + ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false, NUNBERSAkt); ReadParameter(param, "InfluxDB", "Field", true, NUNBERSAkt); ReadParameter(param, "InfluxDBv2", "Field", true, NUNBERSAkt); ReadParameter(param, "InfluxDB", "Measurement", true, NUNBERSAkt); @@ -2283,12 +2275,12 @@ function UpdateInputIndividual(sel) { WriteParameter(param, category, "PostProcessing", "IgnoreLeadingNaN", false, NUNBERSAkt); // WriteParameter(param, category, "PostProcessing", "IgnoreAllNaN", false, NUNBERSAkt); WriteParameter(param, category, "PostProcessing", "AllowNegativeRates", false, NUNBERSAkt); + WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", false, NUNBERSAkt); WriteParameter(param, category, "InfluxDB", "Field", true, NUNBERSAkt); WriteParameter(param, category, "InfluxDBv2", "Field", true, NUNBERSAkt); WriteParameter(param, category, "InfluxDB", "Measurement", true, NUNBERSAkt); WriteParameter(param, category, "InfluxDBv2", "Measurement", true, NUNBERSAkt); WriteParameter(param, category, "MQTT", "DomoticzIDX", true, NUNBERSAkt); - } function UpdateInput() { @@ -2310,7 +2302,7 @@ function UpdateInput() { document.getElementById("Category_InfluxDBv2_enabled").checked = category["InfluxDBv2"]["enabled"]; setVisible("InfluxDBv2Item", category["InfluxDBv2"]["enabled"]); - document.getElementById("Category_Webhook_enabled").checked = category["Webhook"]["enabled"]; + document.getElementById("Category_Webhook_enabled").checked = category["Webhook"]["enabled"]; setVisible("WebhookItem", category["Webhook"]["enabled"]); WriteParameter(param, category, "TakeImage", "RawImagesLocation", true); @@ -2364,7 +2356,7 @@ function UpdateInput() { WriteParameter(param, category, "PostProcessing", "PreValueUse", false); WriteParameter(param, category, "PostProcessing", "PreValueAgeStartup", true); WriteParameter(param, category, "PostProcessing", "ErrorMessage", false); - WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", false); + // WriteParameter(param, category, "PostProcessing", "CheckDigitIncreaseConsistency", false); WriteParameter(param, category, "MQTT", "Uri", true); WriteParameter(param, category, "MQTT", "MainTopic", true); @@ -2394,9 +2386,9 @@ function UpdateInput() { WriteParameter(param, category, "InfluxDBv2", "Token", true); // WriteParameter(param, category, "InfluxDBv2", "Field", true); - WriteParameter(param, category, "Webhook", "Uri", true); + WriteParameter(param, category, "Webhook", "Uri", true); WriteParameter(param, category, "Webhook", "ApiKey", true); - WriteParameter(param, category, "Webhook", "UploadImg", false); + WriteParameter(param, category, "Webhook", "UploadImg", false); WriteParameter(param, category, "GPIO", "IO0", true); WriteParameter(param, category, "GPIO", "IO1", true); @@ -2478,7 +2470,7 @@ function ReadParameterAll() { category["MQTT"]["enabled"] = document.getElementById("Category_MQTT_enabled").checked; category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked; category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked; - category["Webhook"]["enabled"] = document.getElementById("Category_Webhook_enabled").checked; + category["Webhook"]["enabled"] = document.getElementById("Category_Webhook_enabled").checked; category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked; ReadParameter(param, "TakeImage", "RawImagesLocation", true); @@ -2533,7 +2525,7 @@ function ReadParameterAll() { ReadParameter(param, "PostProcessing", "PreValueUse", false); ReadParameter(param, "PostProcessing", "PreValueAgeStartup", true); ReadParameter(param, "PostProcessing", "ErrorMessage", false); - ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false); + // ReadParameter(param, "PostProcessing", "CheckDigitIncreaseConsistency", false); ReadParameter(param, "MQTT", "Uri", true); ReadParameter(param, "MQTT", "MainTopic", true); @@ -2562,9 +2554,9 @@ function ReadParameterAll() { ReadParameter(param, "InfluxDBv2", "Token", true); // ReadParameter(param, "InfluxDB", "Field", true); - ReadParameter(param, "Webhook", "Uri", true); + ReadParameter(param, "Webhook", "Uri", true); ReadParameter(param, "Webhook", "ApiKey", true); - ReadParameter(param, "Webhook", "UploadImg", false); + ReadParameter(param, "Webhook", "UploadImg", false); ReadParameter(param, "GPIO", "IO0", true); ReadParameter(param, "GPIO", "IO1", true); @@ -2614,7 +2606,7 @@ function UpdateAfterCategoryCheck() { category["InfluxDB"]["enabled"] = document.getElementById("Category_InfluxDB_enabled").checked; category["InfluxDBv2"]["enabled"] = document.getElementById("Category_InfluxDBv2_enabled").checked; category["GPIO"]["enabled"] = document.getElementById("Category_GPIO_enabled").checked; - category["Webhook"]["enabled"] = document.getElementById("Category_Webhook_enabled").checked; + category["Webhook"]["enabled"] = document.getElementById("Category_Webhook_enabled").checked; UpdateInput(); var sel = document.getElementById("Numbers_value1"); @@ -2706,7 +2698,7 @@ function camSettingsSet(){ var _sat_temp = document.getElementById("TakeImage_CamSaturation_value1").value; var _shp_temp = document.getElementById("TakeImage_CamSharpness_value1").value; - var _ashp_temp = document.getElementById("TakeImage_CamAutoSharpness_value1").value; + var _ashp_temp = document.getElementById("TakeImage_CamAutoSharpness_value1").value; if (_ashp_temp == '0') { _ashp_temp = '1'; } @@ -2819,7 +2811,6 @@ function camSettingsSet(){ } var _denoise_temp = document.getElementById("TakeImage_CamDenoise_value1").value; - var _ledi_temp = document.getElementById("TakeImage_LEDIntensity_value1").value; var _zoom_temp = document.getElementById("TakeImage_CamZoom_value1").selectedIndex; @@ -2880,7 +2871,7 @@ function camSettingsSet(){ if (xhttp.responseText == "CamSettingsSet") { document.getElementById("overlay").style.display = "none"; - firework.launch('Cam Settings saved', 'success', 5000); + firework.launch('Cam Settings saved', 'success', 2000); return; } else { @@ -2908,11 +2899,11 @@ function camSettingsSet(){ } function doReboot() { - var stringota = domainname + "/reboot"; - window.location = stringota; - window.location.href = stringota; - window.location.assign(stringota); - window.location.replace(stringota); + var stringota = domainname + "/reboot"; + window.location = stringota; + window.location.href = stringota; + window.location.assign(stringota); + window.location.replace(stringota); } function FormatDecimalValue(_param, _cat, _name) { @@ -2948,7 +2939,7 @@ function numberChanged() { _sel3.selectedIndex = _neu } - var _sel4 = document.getElementById("NumbersMQTTIdx_value1"); + var _sel4 = document.getElementById("NumbersMQTTIdx_value1"); if (_sel4.selectedIndex != _neu) { _sel4.selectedIndex = _neu } @@ -2960,7 +2951,7 @@ function numberMQTTIdxChanged() { _neu = sel.selectedIndex; UpdateInputIndividual(sel); - var _sel2 = document.getElementById("Numbers_value1"); + var _sel2 = document.getElementById("Numbers_value1"); if (_sel2.selectedIndex != _neu) { _sel2.selectedIndex = _neu } @@ -3012,7 +3003,7 @@ function numberInfluxDBChanged() { _sel3.selectedIndex = _neu } - var _sel4 = document.getElementById("NumbersMQTTIdx_value1"); + var _sel4 = document.getElementById("NumbersMQTTIdx_value1"); if (_sel4.selectedIndex != _neu) { _sel4.selectedIndex = _neu } @@ -3099,7 +3090,6 @@ function setVisible(className, visible) { function EnDisableItem(_status, _param, _category, _cat, _name, _optional, _number = -1) { // _status = _category[_cat]["enabled"]; - _color = "rgb(122, 122, 122)"; if (_status) { diff --git a/sd-card/html/readconfigparam.js b/sd-card/html/readconfigparam.js index 19ad019a..75405b02 100644 --- a/sd-card/html/readconfigparam.js +++ b/sd-card/html/readconfigparam.js @@ -6,7 +6,6 @@ var ref = new Array(2); var NUMBERS = new Array(0); var REFERENCES = new Array(0); - function getNUMBERSList() { _domainname = getDomainname(); var namenumberslist = ""; @@ -33,7 +32,6 @@ function getNUMBERSList() { return namenumberslist; } - function getDATAList() { _domainname = getDomainname(); datalist = ""; @@ -62,7 +60,6 @@ function getDATAList() { return datalist; } - function getTFLITEList() { _domainname = getDomainname(); tflitelist = ""; @@ -90,7 +87,6 @@ function getTFLITEList() { return tflitelist; } - function ParseConfig() { config_split = config_gesamt.split("\n"); var aktline = 0; @@ -172,7 +168,7 @@ function ParseConfig() { category[catname]["enabled"] = false; category[catname]["found"] = false; param[catname] = new Object(); - ParamAddValue(param, catname, "DecimalShift", 1, true); + ParamAddValue(param, catname, "DecimalShift", 1, true, "0"); ParamAddValue(param, catname, "AnalogToDigitTransitionStart", 1, true, "9.2"); ParamAddValue(param, catname, "ChangeRateThreshold", 1, true, "2"); // ParamAddValue(param, catname, "PreValueUse", 1, true, "true"); @@ -185,7 +181,7 @@ function ParseConfig() { ParamAddValue(param, catname, "IgnoreLeadingNaN", 1, true, "false"); // ParamAddValue(param, catname, "IgnoreAllNaN", 1, true, "false"); ParamAddValue(param, catname, "ErrorMessage"); - ParamAddValue(param, catname, "CheckDigitIncreaseConsistency"); + ParamAddValue(param, catname, "CheckDigitIncreaseConsistency", 1, true, "false"); var catname = "MQTT"; category[catname] = new Object(); @@ -359,7 +355,6 @@ function ParseConfig() { } } - function ParamAddValue(param, _cat, _param, _anzParam = 1, _isNUMBER = false, _defaultValue = "", _checkRegExList = null) { param[_cat][_param] = new Object(); param[_cat][_param]["found"] = false; @@ -371,7 +366,6 @@ function ParamAddValue(param, _cat, _param, _anzParam = 1, _isNUMBER = false, _d param[_cat][_param].checkRegExList = _checkRegExList; }; - function ParseConfigParamAll(_aktline, _catname) { ++_aktline; @@ -403,7 +397,6 @@ function ParseConfigParamAll(_aktline, _catname) { return _aktline; } - function ParamExtractValue(_param, _linesplit, _catname, _paramname, _aktline, _iscom, _anzvalue = 1) { if ((_linesplit[0].toUpperCase() == _paramname.toUpperCase()) && (_linesplit.length > _anzvalue)) { _param[_catname][_paramname]["found"] = true; @@ -417,7 +410,6 @@ function ParamExtractValue(_param, _linesplit, _catname, _paramname, _aktline, _ } } - function ParamExtractValueAll(_param, _linesplit, _catname, _aktline, _iscom) { for (var paramname in _param[_catname]) { _AktROI = "default"; @@ -475,7 +467,6 @@ function ParamExtractValueAll(_param, _linesplit, _catname, _aktline, _iscom) { } } - function getCamConfig() { ParseConfig(); @@ -653,12 +644,10 @@ function getCamConfig() { return param; } - function getConfigParameters() { return param; } - function WriteConfigININew() { // Cleanup empty NUMBERS for (var j = 0; j < NUMBERS.length; ++j) { @@ -760,7 +749,6 @@ function WriteConfigININew() { } } - function isCommented(input) { let isComment = false; @@ -772,7 +760,6 @@ function isCommented(input) { return [isComment, input]; } - function SaveConfigToServer(_domainname){ // leere Zeilen am Ende löschen var zw = config_split.length - 1; @@ -792,17 +779,14 @@ function SaveConfigToServer(_domainname){ FileSendContent(config_gesamt, "/config/config.ini", _domainname); } - function getConfig() { return config_gesamt; } - function getConfigCategory() { return category; } - function ExtractROIs(_aktline, _type){ var linesplit = ZerlegeZeile(_aktline); abc = getNUMBERS(linesplit[0], _type); @@ -819,7 +803,6 @@ function ExtractROIs(_aktline, _type){ } } - function getNUMBERS(_name, _type, _create = true) { _pospunkt = _name.indexOf ("."); @@ -879,7 +862,6 @@ function getNUMBERS(_name, _type, _create = true) { return neuroi; } - function CopyReferenceToImgTmp(_domainname) { for (index = 0; index < 2; ++index) { _filenamevon = REFERENCES[index]["name"]; @@ -894,12 +876,10 @@ function CopyReferenceToImgTmp(_domainname) { } } - function GetReferencesInfo(){ return REFERENCES; } - function UpdateConfigReferences(_domainname){ for (var index = 0; index < 2; ++index) { _filenamenach = REFERENCES[index]["name"]; @@ -914,7 +894,6 @@ function UpdateConfigReferences(_domainname){ } } - function UpdateConfigReference(_anzneueref, _domainname){ var index = 0; @@ -939,12 +918,10 @@ function UpdateConfigReference(_anzneueref, _domainname){ FileCopyOnServer(_filenamevon, _filenamenach, _domainname); } - function getNUMBERInfo(){ return NUMBERS; } - function RenameNUMBER(_alt, _neu){ if ((_neu.indexOf(".") >= 0) || (_neu.indexOf(",") >= 0) || (_neu.indexOf(" ") >= 0) || (_neu.indexOf("\"") >= 0)) { return "Number sequence name must not contain , . \" or a space"; @@ -972,7 +949,6 @@ function RenameNUMBER(_alt, _neu){ return ""; } - function DeleteNUMBER(_delete){ if (NUMBERS.length == 1) { return "One number sequence is mandatory. Therefore this cannot be deleted" @@ -993,7 +969,6 @@ function DeleteNUMBER(_delete){ return ""; } - function CreateNUMBER(_numbernew){ found = false; @@ -1041,7 +1016,6 @@ function CreateNUMBER(_numbernew){ return ""; } - function getROIInfo(_typeROI, _number){ index = -1; @@ -1059,7 +1033,6 @@ function getROIInfo(_typeROI, _number){ } } - function RenameROI(_number, _type, _alt, _neu){ if ((_neu.includes("=")) || (_neu.includes(".")) || (_neu.includes(":")) || (_neu.includes(",")) || (_neu.includes(";")) || (_neu.includes(" ")) || (_neu.includes("\""))) { return "ROI name must not contain . : , ; = \" or space"; @@ -1098,7 +1071,6 @@ function RenameROI(_number, _type, _alt, _neu){ return ""; } - function DeleteNUMBER(_delte) { if (NUMBERS.length == 1) { return "The last number cannot be deleted" @@ -1119,7 +1091,6 @@ function DeleteNUMBER(_delte) { return ""; } - function CreateROI(_number, _type, _pos, _roinew, _x, _y, _dx, _dy, _CCW){ _indexnumber = -1;