mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-08 17:04:39 -04:00
Add a read-only TX antenna menu entry showing the active one, closing #559
This commit is contained in:
@@ -191,10 +191,26 @@ std::vector<long> SDRDeviceInfo::getSampleRates(int direction, size_t channel) {
|
||||
}
|
||||
|
||||
std::vector<std::string> SDRDeviceInfo::getAntennaNames(int direction, size_t channel) {
|
||||
|
||||
SoapySDR::Device *dev = getSoapyDevice();
|
||||
|
||||
return dev->listAntennas(direction, channel);
|
||||
|
||||
if (dev) {
|
||||
|
||||
return dev->listAntennas(direction, channel);
|
||||
}
|
||||
|
||||
return std::vector<std::string>();
|
||||
}
|
||||
|
||||
std::string SDRDeviceInfo::getAntennaName(int direction, size_t channel) {
|
||||
SoapySDR::Device *dev = getSoapyDevice();
|
||||
|
||||
if (dev) {
|
||||
return dev->getAntenna(direction, channel);
|
||||
}
|
||||
|
||||
return std::string("");
|
||||
|
||||
}
|
||||
|
||||
long SDRDeviceInfo::getSampleRateNear(int direction, size_t channel, long sampleRate_in) {
|
||||
|
||||
@@ -85,6 +85,8 @@ public:
|
||||
std::vector<long> getSampleRates(int direction, size_t channel);
|
||||
|
||||
std::vector<std::string> getAntennaNames(int direction, size_t channel);
|
||||
|
||||
std::string getAntennaName(int direction, size_t channel);
|
||||
|
||||
long getSampleRateNear(int direction, size_t channel, long sampleRate_in);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user