mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 17:28:50 -05:00
LimeSDR input: antenna select fixes
This commit is contained in:
parent
ed9a74f0ff
commit
df9e1d5900
@ -179,7 +179,7 @@ bool DeviceLimeSDR::SetRBBPGA_dB(lms_device_t *device, std::size_t chan, float v
|
||||
return true;
|
||||
}
|
||||
|
||||
bool DeviceLimeSDR::setAntennaPath(lms_device_t *device, std::size_t chan, int path)
|
||||
bool DeviceLimeSDR::setRxAntennaPath(lms_device_t *device, std::size_t chan, int path)
|
||||
{
|
||||
// if (LMS_WriteParam(device, LMS7param(MAC), chan+1) < 0)
|
||||
// {
|
||||
@ -245,7 +245,7 @@ bool DeviceLimeSDR::setAntennaPath(lms_device_t *device, std::size_t chan, int p
|
||||
//
|
||||
// return true;
|
||||
|
||||
switch ((PathRFE) path)
|
||||
switch ((PathRxRFE) path)
|
||||
{
|
||||
case PATH_RFE_LNAH:
|
||||
if (LMS_SetAntenna(device, LMS_CH_RX, chan, 1) < 0)
|
||||
@ -262,7 +262,7 @@ bool DeviceLimeSDR::setAntennaPath(lms_device_t *device, std::size_t chan, int p
|
||||
}
|
||||
break;
|
||||
case PATH_RFE_LNAW:
|
||||
if (LMS_SetAntenna(device, LMS_CH_RX, chan, 2) < 0)
|
||||
if (LMS_SetAntenna(device, LMS_CH_RX, chan, 3) < 0)
|
||||
{
|
||||
fprintf(stderr, "DeviceLimeSDR::setAntennaPath: cannot set to LNAW\n");
|
||||
return false;
|
||||
|
@ -22,7 +22,7 @@
|
||||
class DeviceLimeSDR
|
||||
{
|
||||
public:
|
||||
enum PathRFE
|
||||
enum PathRxRFE
|
||||
{
|
||||
PATH_RFE_NONE = 0,
|
||||
PATH_RFE_LNAH,
|
||||
@ -41,7 +41,7 @@ public:
|
||||
/** set PGA gain Range: [0-32] (dB) **/
|
||||
static bool SetRBBPGA_dB(lms_device_t *device, std::size_t chan, float value);
|
||||
/** Set antenna path **/
|
||||
static bool setAntennaPath(lms_device_t *device, std::size_t chan, int path);
|
||||
static bool setRxAntennaPath(lms_device_t *device, std::size_t chan, int path);
|
||||
};
|
||||
|
||||
#endif /* DEVICES_LIMESDR_DEVICELIMESDR_H_ */
|
||||
|
@ -708,7 +708,7 @@ bool LimeSDRInput::applySettings(const LimeSDRInputSettings& settings, bool forc
|
||||
|
||||
if (m_deviceShared.m_deviceParams->getDevice() != 0)
|
||||
{
|
||||
if (DeviceLimeSDR::setAntennaPath(m_deviceShared.m_deviceParams->getDevice(),
|
||||
if (DeviceLimeSDR::setRxAntennaPath(m_deviceShared.m_deviceParams->getDevice(),
|
||||
m_deviceShared.m_channel,
|
||||
m_settings.m_antennaPath))
|
||||
{
|
||||
|
@ -264,6 +264,8 @@ void LimeSDRInputGUI::displaySettings()
|
||||
ui->gain->setValue(m_settings.m_gain);
|
||||
ui->gainText->setText(tr("%1dB").arg(m_settings.m_gain));
|
||||
|
||||
ui->antenna->setCurrentIndex((int) m_settings.m_antennaPath);
|
||||
|
||||
setNCODisplay();
|
||||
}
|
||||
|
||||
|
@ -668,9 +668,12 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Antenna select: No: none, Lo: 700:900M, Hi: 2:2.6G, Wi: wideband, T1: Tx1 LB, T2: Tx2 LB</string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Au</string>
|
||||
<string>No</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -54,6 +54,7 @@ QByteArray LimeSDRInputSettings::serialize() const
|
||||
s.writeU32(10, m_gain);
|
||||
s.writeBool(11, m_ncoEnable);
|
||||
s.writeS32(12, m_ncoFrequency);
|
||||
s.writeS32(13, (int) m_antennaPath);
|
||||
|
||||
return s.final();
|
||||
}
|
||||
@ -83,6 +84,8 @@ bool LimeSDRInputSettings::deserialize(const QByteArray& data)
|
||||
d.readU32(10, &m_gain, 0);
|
||||
d.readBool(11, &m_ncoEnable, false);
|
||||
d.readS32(12, &m_ncoFrequency, 0);
|
||||
d.readS32(13, &intval, 0);
|
||||
m_antennaPath = (PathRFE) intval;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -126,9 +126,9 @@ Use this slider to adjust the global gain of the LNA, TIA and PGA. LimeSuite sof
|
||||
|
||||
Use this combo box to select the antenna input:
|
||||
|
||||
- **Au**: Auto: automatically selects optimal input depending on LO center frequency
|
||||
- **Lo**: Selects the low frequency input
|
||||
- **Hi**: Selects the high frequncy input
|
||||
- **No**: None
|
||||
- **Lo**: Selects the low frequency input (700 to 900 MHz nominally)
|
||||
- **Hi**: Selects the high frequncy input (2 to 2.6 GHz)
|
||||
- **Wo**: Selects the wideband input
|
||||
- **T1**: Selects loopback from TX #1 (experimental)
|
||||
- **T1**: Selects loopback from TX #2 (experimental)
|
||||
|
Loading…
Reference in New Issue
Block a user