mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-03-16 08:29:15 +01:00
LP-505 Change the channel tooltip according to the RFBand used.
This commit is contained in:
parent
f2cc267435
commit
b42d6d0ecf
@ -334,14 +334,17 @@ void ConfigOPLinkWidget::rfBandChanged()
|
||||
case OPLinkSettings::RFBAND_915MHZ:
|
||||
frequency_base = 900.0f;
|
||||
frequency_step = FREQUENCY_STEP * 2.0f;
|
||||
channel_tooltip = tr("Channel 0 is 900 MHz, channel 250 is 920 MHz, and the channel spacing is 80 KHz.");
|
||||
break;
|
||||
case OPLinkSettings::RFBAND_868MHZ:
|
||||
frequency_base = 860.0f;
|
||||
frequency_step = FREQUENCY_STEP * 2.0f;
|
||||
channel_tooltip = tr("Channel 0 is 860 MHz, channel 250 is 880 MHz, and the channel spacing is 80 KHz.");
|
||||
break;
|
||||
case OPLinkSettings::RFBAND_433MHZ:
|
||||
frequency_base = 430.0f;
|
||||
frequency_step = FREQUENCY_STEP;
|
||||
channel_tooltip = tr("Channel 0 is 430 MHz, channel 250 is 440 MHz, and the channel spacing is 40 KHz.");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -386,6 +389,9 @@ void ConfigOPLinkWidget::updateFrequencyDisplay()
|
||||
|
||||
m_oplink->MinFreq->setText("(" + QString::number(minFrequency, 'f', 3) + " MHz)");
|
||||
m_oplink->MaxFreq->setText("(" + QString::number(maxFrequency, 'f', 3) + " MHz)");
|
||||
|
||||
m_oplink->MinimumChannel->setToolTip(channel_tooltip);
|
||||
m_oplink->MaximumChannel->setToolTip(channel_tooltip);
|
||||
}
|
||||
|
||||
void ConfigOPLinkWidget::mainPortChanged()
|
||||
|
@ -54,6 +54,7 @@ private:
|
||||
// Frequency display settings
|
||||
float frequency_base;
|
||||
float frequency_step;
|
||||
QString channel_tooltip;
|
||||
|
||||
// Is the status current?
|
||||
bool statusUpdated;
|
||||
|
@ -1306,9 +1306,6 @@
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Channel 0 is 430 MHz, channel 250 is 440 MHz, and the channel spacing is 40 KHz.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>250</number>
|
||||
</property>
|
||||
@ -1433,9 +1430,6 @@
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Channel 0 is 430 MHz, channel 250 is 440 MHz, and the channel spacing is 40 KHz.</string>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>250</number>
|
||||
</property>
|
||||
|
Loading…
x
Reference in New Issue
Block a user