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:
co-authored by
Peter Feerick
parent
09980bf640
commit
c3c8a2e3f1
@@ -1346,6 +1346,11 @@ SetupPanel::SetupPanel(QWidget * parent, ModelData & model, GeneralSettings & ge
|
||||
ui->gfEnabled->hide();
|
||||
}
|
||||
|
||||
if (!firmware->getCapability(HasADCJitterFilter))
|
||||
{
|
||||
ui->jitterFilter->hide();
|
||||
}
|
||||
|
||||
// Beep Center checkboxes
|
||||
prevFocus = ui->trimsDisplay;
|
||||
int analogs = CPN_MAX_STICKS + getBoardCapability(board, Board::Pots) + getBoardCapability(board, Board::Sliders);
|
||||
@@ -1590,6 +1595,7 @@ void SetupPanel::update()
|
||||
ui->extendedTrims->setChecked(model->extendedTrims);
|
||||
ui->displayText->setChecked(model->displayChecklist);
|
||||
ui->gfEnabled->setChecked(!model->noGlobalFunctions);
|
||||
ui->jitterFilter->setCurrentIndex(model->jitterFilter);
|
||||
|
||||
updateBeepCenter();
|
||||
updateStartupSwitches();
|
||||
@@ -1741,6 +1747,14 @@ void SetupPanel::on_gfEnabled_toggled(bool checked)
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void SetupPanel::on_jitterFilter_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
model->jitterFilter = ui->jitterFilter->currentIndex();
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
|
||||
void SetupPanel::on_throttleTrim_toggled(bool checked)
|
||||
{
|
||||
model->thrTrim = checked;
|
||||
|
||||
Reference in New Issue
Block a user