Add rate threshold parameter (#3195)

* still needs to be tested

https://github.com/jomjol/AI-on-the-edge-device/issues/3143

* Update ClassFlowPostProcessing.cpp

code formatting

* Update ClassFlowDefineTypes.h

code formatting

* Update ClassFlowPostProcessing.h

code formatting

* Update edit_config_template.html

* fix

* Update config.ini

* Update edit_config_template.html

* Updated param doc

* Rename parameters

* Update edit_config_template.html

* Update NUMBER.ChangeRateThreshold.md

* Update NUMBER.ChangeRateThreshold.md

---------

Co-authored-by: CaCO3 <caco3@ruinelli.ch>
This commit is contained in:
michael
2024-08-30 19:29:57 +02:00
committed by GitHub
parent 822753bb4f
commit d8e37dce48
9 changed files with 129 additions and 59 deletions

View File

@@ -66,6 +66,7 @@ main.ana4 155 328 92 92 false
[PostProcessing]
main.DecimalShift = 0
main.AnalogDigitalTransitionStart = 9.2
main.ChangeRateThreshold = 2
PreValueUse = true
PreValueAgeStartup = 720
main.AllowNegativeRates = false

View File

@@ -969,6 +969,19 @@
<td>$TOOLTIP_PostProcessing_NUMBER.MaxRateType</td>
</tr>
<tr>
<td class="indent2">
<input type="checkbox" id="PostProcessing_ChangeRateThreshold_enabled" value="1" onclick = 'InvertEnableItem("PostProcessing", "ChangeRateThreshold")' unchecked >
<label for=PostProcessing_ChangeRateThreshold_enabled><class id="PostProcessing_ChangeRateThreshold_text" style="color:black;">Change Rate Threshold</class></label>
</td>
<td>
<input required type="number" id="PostProcessing_ChangeRateThreshold_value1" step="1" min="1" max="9" value="2"
oninput="(!validity.rangeUnderflow||(value=1)) && (!validity.rangeOverflow||(value=9)) &&
(!validity.stepMismatch||(value=parseInt(this.value)));">
</td>
<td>$TOOLTIP_PostProcessing_NUMBER.ChangeRateThreshold</td>
</tr>
<tr>
<td class="indent2">
<label><class id="PostProcessing_ExtendedResolution_text" style="color:black;">Extended Resolution</class></label>
@@ -2163,6 +2176,7 @@ function UpdateInputIndividual(sel) {
// ReadParameter(param, "PostProcessing", "PreValueUse", false, NUNBERSAkt);
ReadParameter(param, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
ReadParameter(param, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
ReadParameter(param, "PostProcessing", "ChangeRateThreshold", true, NUNBERSAkt);
ReadParameter(param, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
ReadParameter(param, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
ReadParameter(param, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);
@@ -2180,6 +2194,7 @@ function UpdateInputIndividual(sel) {
// WriteParameter(param, category, "PostProcessing", "PreValueUse", false, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "DecimalShift", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "AnalogDigitalTransitionStart", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "ChangeRateThreshold", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "MaxRateValue", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "MaxRateType", true, NUNBERSAkt);
WriteParameter(param, category, "PostProcessing", "ExtendedResolution", false, NUNBERSAkt);

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -173,12 +173,13 @@ function ParseConfig() {
category[catname]["found"] = false;
param[catname] = new Object();
ParamAddValue(param, catname, "DecimalShift", 1, true);
ParamAddValue(param, catname, "AnalogDigitalTransitionStart", 1, true);
ParamAddValue(param, catname, "AnalogDigitalTransitionStart", 1, true, "9.2");
ParamAddValue(param, catname, "ChangeRateThreshold", 1, true, "2");
// ParamAddValue(param, catname, "PreValueUse", 1, true, "true");
ParamAddValue(param, catname, "PreValueUse");
ParamAddValue(param, catname, "PreValueAgeStartup");
ParamAddValue(param, catname, "AllowNegativeRates", 1, true, "false");
ParamAddValue(param, catname, "MaxRateValue", 1, true);
ParamAddValue(param, catname, "MaxRateValue", 1, true, "0.05");
ParamAddValue(param, catname, "MaxRateType", 1, true);
ParamAddValue(param, catname, "ExtendedResolution", 1, true, "false");
ParamAddValue(param, catname, "IgnoreLeadingNaN", 1, true, "false");