feat: Model level ADC Jitter filter option (#1363)

* ADC Filter - On/off state configurable at the model level

* Updated YAML configuration to match change from ADC Filter feature commit

* Companion changes to support ADC jitter filter to be a model configuration item.

* Renamed jitterFilter field to noJitterFilter.

This better describes the semantic, which is inverted.

* Updated after review

* Re-run generate-yaml

* Changed ADC Jitter filter control on Model to be tri state.
Off, On or use the radio setting

* Adde NOBACKUP() to the added field

* Re-generate yaml_datastructs

* Making the default state to use radio setting/Global value

* Updated after review:
Changing to more consistent naming across firmware and companion.

* Reverted  files that was accidently added to the commit.

Co-authored-by: Peter Feerick <peter.feerick@gmail.com>
This commit is contained in:
Stephen Mose Aaskov
2022-01-26 20:54:23 +10:00
committed by GitHub
co-authored by Peter Feerick
parent 09980bf640
commit c3c8a2e3f1
66 changed files with 334 additions and 58 deletions
+9 -2
View File
@@ -96,7 +96,7 @@ enum MenuModelSetupItems {
#endif
ITEM_MODEL_SETUP_BEEP_CENTER,
ITEM_MODEL_SETUP_USE_GLOBAL_FUNCTIONS,
ITEM_MODEL_SETUP_USE_JITTER_FILTER,
#if defined(PXX2)
ITEM_MODEL_SETUP_REGISTRATION_ID,
#endif
@@ -444,6 +444,8 @@ void menuModelSetup(event_t event)
NUM_STICKS + NUM_POTS + NUM_SLIDERS - 1, // Center beeps
0, // Global functions
0, // ADC Jitter filter
REGISTRATION_ID_ROWS
@@ -906,11 +908,16 @@ void menuModelSetup(event_t event)
}
break;
case ITEM_MODEL_SETUP_USE_GLOBAL_FUNCTIONS:
case ITEM_MODEL_SETUP_USE_GLOBAL_FUNCTIONS:
lcdDrawTextAlignedLeft(y, STR_USE_GLOBAL_FUNCS);
drawCheckBox(MODEL_SETUP_2ND_COLUMN, y, !g_model.noGlobalFunctions, attr);
if (attr) g_model.noGlobalFunctions = !checkIncDecModel(event, !g_model.noGlobalFunctions, 0, 1);
break;
case ITEM_MODEL_SETUP_USE_JITTER_FILTER:
g_model.jitterFilter = editChoice(MODEL_SETUP_2ND_COLUMN, y, STR_JITTER_FILTER, STR_ADCFILTERVALUES, g_model.jitterFilter, 0, 2, attr, event);
break;
#if defined(HARDWARE_INTERNAL_MODULE)
case ITEM_MODEL_SETUP_INTERNAL_MODULE_LABEL: