Fixes #1205 - Delay only applied to Play family function, with a
configurable delay, between 0 and 300ms (default is 150ms).
This commit is contained in:
@@ -516,7 +516,7 @@ class GeneralSettings {
|
||||
unsigned int gpsFormat;
|
||||
int speakerVolume;
|
||||
unsigned int backlightBright;
|
||||
unsigned int switchesDelay;
|
||||
int switchesDelay;
|
||||
int currentCalib;
|
||||
int temperatureCalib;
|
||||
int temperatureWarn;
|
||||
|
||||
@@ -2709,7 +2709,7 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum bo
|
||||
internalField.Append(new SignedField<2>((int &)generalData.hapticMode));
|
||||
|
||||
if (IS_ARM(board))
|
||||
internalField.Append(new UnsignedField<8>(generalData.switchesDelay));
|
||||
internalField.Append(new SignedField<8>(generalData.switchesDelay));
|
||||
else
|
||||
internalField.Append(new SpareBitsField<8>());
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
|
||||
}
|
||||
|
||||
if (IS_ARM(eepromInterface->getBoard())) {
|
||||
ui->switchesDelay->setValue(10*g_eeGeneral.switchesDelay);
|
||||
ui->switchesDelay->setValue(10*(g_eeGeneral.switchesDelay+15));
|
||||
}
|
||||
else {
|
||||
ui->switchesDelay->hide();
|
||||
@@ -527,7 +527,7 @@ void GeneralEdit::on_backlightautoSB_editingFinished()
|
||||
|
||||
void GeneralEdit::on_switchesDelay_valueChanged()
|
||||
{
|
||||
g_eeGeneral.switchesDelay = ui->switchesDelay->value() / 10;
|
||||
g_eeGeneral.switchesDelay = (ui->switchesDelay->value() / 10) - 15;
|
||||
updateSettings();
|
||||
}
|
||||
|
||||
|
||||
@@ -1977,7 +1977,7 @@ Mode 4:
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Switches Delay (mid position)</string>
|
||||
<string>Play Delay (switch mid position)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -2004,7 +2004,7 @@ p, li { white-space: pre-wrap; }
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>250</number>
|
||||
<number>300</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>10</number>
|
||||
|
||||
Reference in New Issue
Block a user