RssiPowerOff alarm enabled by default (#5129)

* RssiPowerOff alarm enabled by default
+ Companion support

* Fix continuously toggling RSSI on shutdown setting on X9
This commit is contained in:
Bertrand Songis
2017-08-04 11:01:52 +02:00
committed by Andre Bernet
parent 6304f0daf6
commit 76e72c8a86
12 changed files with 147 additions and 88 deletions
+18 -5
View File
@@ -197,7 +197,7 @@ ui(new Ui::GeneralSetup)
}
int reCount = firmware->getCapability(RotaryEncoders);
if (reCount==0) {
if (reCount == 0) {
ui->re_label->hide();
ui->re_CB->hide();
}
@@ -210,8 +210,15 @@ ui(new Ui::GeneralSetup)
ui->backlightautoSB->setValue(generalSettings.backlightDelay*5);
ui->inactimerSB->setValue(generalSettings.inactivityTimer);
ui->memwarnChkB->setChecked(!generalSettings.disableMemoryWarning); //Default is zero=checked
ui->alarmwarnChkB->setChecked(!generalSettings.disableAlarmWarning);//Default is zero=checked
ui->memwarnChkB->setChecked(!generalSettings.disableMemoryWarning); // Default is zero=checked
ui->alarmwarnChkB->setChecked(!generalSettings.disableAlarmWarning); // Default is zero=checked
if (IS_ARM(firmware->getBoard())) {
ui->rssiPowerOffWarnChkB->setChecked(!generalSettings.disableRssiPoweroffAlarm); // Default is zero=checked
}
else {
ui->rssiPowerOffWarnChkB->hide();
}
if (IS_HORUS(firmware->getBoard())) {
ui->splashScreenChkB->hide();
@@ -607,18 +614,24 @@ void GeneralSetupPanel::on_inactimerSB_editingFinished()
emit modified();
}
void GeneralSetupPanel::on_memwarnChkB_stateChanged(int )
void GeneralSetupPanel::on_memwarnChkB_stateChanged(int)
{
generalSettings.disableMemoryWarning = ui->memwarnChkB->isChecked() ? 0 : 1;
emit modified();
}
void GeneralSetupPanel::on_alarmwarnChkB_stateChanged(int )
void GeneralSetupPanel::on_alarmwarnChkB_stateChanged(int)
{
generalSettings.disableAlarmWarning = ui->alarmwarnChkB->isChecked() ? 0 : 1;
emit modified();
}
void GeneralSetupPanel::on_rssiPowerOffWarnChkB_stateChanged(int)
{
generalSettings.disableRssiPoweroffAlarm = ui->rssiPowerOffWarnChkB->isChecked() ? 0 : 1;
emit modified();
}
void GeneralSetupPanel::on_beeperCB_currentIndexChanged(int index)
{
generalSettings.beeperMode = (GeneralSettings::BeeperMode)(index-2);
+1
View File
@@ -40,6 +40,7 @@ class GeneralSetupPanel : public GeneralPanel
void on_splashScreenChkB_stateChanged(int);
void on_splashScreenDuration_currentIndexChanged(int index);
void on_alarmwarnChkB_stateChanged(int);
void on_rssiPowerOffWarnChkB_stateChanged(int);
void on_gpsFormatCB_currentIndexChanged(int index);
void on_displayTypeCB_currentIndexChanged(int index);
void on_BLBright_SB_editingFinished();
+111 -57
View File
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>782</width>
<height>694</height>
<width>806</width>
<height>801</height>
</rect>
</property>
<property name="windowTitle">
@@ -1121,7 +1121,7 @@ p, li { white-space: pre-wrap; }
<property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum>
</property>
<item row="14" column="1">
<item row="15" column="1">
<widget class="QComboBox" name="stickmodeCB">
<property name="toolTip">
<string/>
@@ -1175,7 +1175,7 @@ Mode 4:
</item>
</widget>
</item>
<item row="15" column="1">
<item row="16" column="1">
<widget class="QComboBox" name="channelorderCB">
<property name="toolTip">
<string/>
@@ -1311,14 +1311,14 @@ Mode 4:
</item>
</widget>
</item>
<item row="14" column="0">
<item row="15" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string>Stick Mode</string>
</property>
</widget>
</item>
<item row="16" column="1">
<item row="17" column="1">
<widget class="QComboBox" name="units_CB">
<item>
<property name="text">
@@ -1332,7 +1332,7 @@ Mode 4:
</item>
</widget>
</item>
<item row="15" column="0">
<item row="16" column="0">
<widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@@ -1345,14 +1345,14 @@ Mode 4:
</property>
</widget>
</item>
<item row="17" column="0">
<item row="18" column="0">
<widget class="QLabel" name="gpsFormatLabel">
<property name="text">
<string>GPS Coordinates</string>
</property>
</widget>
</item>
<item row="18" column="1">
<item row="19" column="1">
<widget class="QSpinBox" name="switchesDelay">
<property name="toolTip">
<string/>
@@ -1462,7 +1462,7 @@ p, li { white-space: pre-wrap; }
</size>
</property>
<property name="text">
<string>Low Memory Warning</string>
<string>Low EEPROM Warning</string>
</property>
</widget>
</item>
@@ -1643,7 +1643,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="13" column="0">
<item row="14" column="0">
<widget class="QLabel" name="mavbaud_label">
<property name="minimumSize">
<size>
@@ -1939,7 +1939,7 @@ Acceptable values are 5v..10v</string>
</item>
</layout>
</item>
<item row="13" column="1" colspan="2">
<item row="14" column="1" colspan="2">
<widget class="QComboBox" name="mavbaud_CB">
<item>
<property name="text">
@@ -2024,6 +2024,20 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="18" column="1">
<widget class="QComboBox" name="gpsFormatCB">
<item>
<property name="text">
<string>hh° (N/S) mm' ss''.dd</string>
</property>
</item>
<item>
<property name="text">
<string>NMEA</string>
</property>
</item>
</widget>
</item>
<item row="12" column="1" colspan="2">
<widget class="QCheckBox" name="memwarnChkB">
<property name="sizePolicy">
@@ -2100,21 +2114,7 @@ p, li { white-space: pre-wrap; }
</item>
</widget>
</item>
<item row="17" column="1">
<widget class="QComboBox" name="gpsFormatCB">
<item>
<property name="text">
<string>hh° (N/S) mm' ss''.dd</string>
</property>
</item>
<item>
<property name="text">
<string>NMEA</string>
</property>
</item>
</widget>
</item>
<item row="18" column="0">
<item row="19" column="0">
<widget class="QLabel" name="switchesDelayLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
@@ -2127,14 +2127,14 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="16" column="0">
<item row="17" column="0">
<widget class="QLabel" name="units_label">
<property name="text">
<string>Measurement Units</string>
</property>
</widget>
</item>
<item row="19" column="0">
<item row="20" column="0">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -2185,6 +2185,47 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="beeperlenCB">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
</size>
</property>
<item>
<property name="text">
<string>X-Short</string>
</property>
</item>
<item>
<property name="text">
<string>Short</string>
</property>
</item>
<item>
<property name="text">
<string>Normal</string>
</property>
</item>
<item>
<property name="text">
<string>Long</string>
</property>
</item>
<item>
<property name="text">
<string>X-Long</string>
</property>
</item>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_12">
<property name="sizePolicy">
@@ -2255,8 +2296,8 @@ p, li { white-space: pre-wrap; }
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="beeperlenCB">
<item row="13" column="0">
<widget class="QLabel" name="label_15">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
@@ -2266,34 +2307,47 @@ p, li { white-space: pre-wrap; }
<property name="minimumSize">
<size>
<width>0</width>
<height>22</height>
<height>0</height>
</size>
</property>
<item>
<property name="text">
<string>X-Short</string>
</property>
</item>
<item>
<property name="text">
<string>Short</string>
</property>
</item>
<item>
<property name="text">
<string>Normal</string>
</property>
</item>
<item>
<property name="text">
<string>Long</string>
</property>
</item>
<item>
<property name="text">
<string>X-Long</string>
</property>
</item>
<property name="text">
<string>RSSI Poweroff Warning</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QCheckBox" name="rssiPowerOffWarnChkB">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="whatsThis">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; text-decoration: underline;&quot;&gt;Warnings&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;These will define startup warnings.&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Throttle warning - will alert if the throttle is not at idle during startup&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Switch warning - will alert if switches are not in their defaul position&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Memory warning - will alert if there's not a lot of memory left&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Silent mode warning - will alert you if the beeper is set to quiet (0)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>