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;
|
||||
|
||||
@@ -204,6 +204,7 @@ class SetupPanel : public ModelPanel
|
||||
void onItemModelAboutToBeUpdated();
|
||||
void onItemModelUpdateComplete();
|
||||
void onModuleUpdateItemModels();
|
||||
void on_jitterFilter_currentIndexChanged(int index);
|
||||
|
||||
private:
|
||||
Ui::Setup *ui;
|
||||
|
||||
@@ -537,6 +537,45 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QLabel" name="label_jitterFilter">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>ADC filter</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="QComboBox" name="jitterFilter">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Global</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Off</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>On</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
<item row="1" column="4">
|
||||
<widget class="QPushButton" name="editText">
|
||||
<property name="sizePolicy">
|
||||
|
||||
Reference in New Issue
Block a user