Add a read-only TX antenna menu entry showing the active one, closing #559

This commit is contained in:
vsonnier
2017-08-25 07:27:30 +02:00
parent 8993121fc6
commit a018a36100
4 changed files with 46 additions and 5 deletions
+18 -2
View File
@@ -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) {
+2
View File
@@ -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);