feat: Convert PPM_UNIT build option to runtime radio setting (#3993)

This commit is contained in:
philmoz
2023-10-10 19:47:50 +10:00
committed by GitHub
parent b05044091a
commit 837677b3ef
58 changed files with 248 additions and 188 deletions
@@ -154,6 +154,8 @@ ui(new Ui::GeneralSetup)
ui->units_CB->setCurrentIndex(generalSettings.imperial);
}
ui->ppm_units_CB->setCurrentIndex(generalSettings.ppmunit);
ui->gpsFormatCB->setCurrentIndex(generalSettings.gpsFormat);
ui->timezoneLE->setTime((generalSettings.timezone * 3600) + (generalSettings.timezoneMinutes/*quarter hours*/ * 15 * 60));
@@ -680,6 +682,12 @@ void GeneralSetupPanel::on_units_CB_currentIndexChanged(int index)
emit modified();
}
void GeneralSetupPanel::on_ppm_units_CB_currentIndexChanged(int index)
{
generalSettings.ppmunit = ui->ppm_units_CB->currentIndex();
emit modified();
}
void GeneralSetupPanel::on_beeperlenCB_currentIndexChanged(int index)
{
generalSettings.beeperLength = index-2;
+1
View File
@@ -47,6 +47,7 @@ class GeneralSetupPanel : public GeneralPanel
void on_re_CB_currentIndexChanged(int index);
void on_countrycode_CB_currentIndexChanged(int index);
void on_units_CB_currentIndexChanged(int index);
void on_ppm_units_CB_currentIndexChanged(int index);
void on_faimode_CB_stateChanged(int );
void on_rotEncMode_CB_currentIndexChanged(int index);
void on_speakerPitchSB_editingFinished();
+30 -1
View File
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>858</width>
<height>880</height>
<height>891</height>
</rect>
</property>
<property name="windowTitle">
@@ -2485,6 +2485,35 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="26" column="0">
<widget class="QLabel" name="ppm_units_label">
<property name="text">
<string>PPM Units</string>
</property>
</widget>
</item>
<item row="26" column="1">
<widget class="QComboBox" name="ppm_units_CB">
<property name="currentText">
<string>0.--</string>
</property>
<item>
<property name="text">
<string>0.--</string>
</property>
</item>
<item>
<property name="text">
<string>0.0</string>
</property>
</item>
<item>
<property name="text">
<string>us</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item row="0" column="2">