mirror of
				https://github.com/AlexandreRouma/SDRPlusPlus.git
				synced 2025-10-31 00:48:11 +01:00 
			
		
		
		
	Hide antenna select when SDR only has one antenna
This commit is contained in:
		| @@ -132,7 +132,7 @@ public: | |||||||
| #ifdef _WIN32 | #ifdef _WIN32 | ||||||
|         send(sock, (char*)&cmd, sizeof(command_t), 0);   |         send(sock, (char*)&cmd, sizeof(command_t), 0);   | ||||||
| #else | #else | ||||||
|         write(sockfd, &cmd, sizeof(command_t)); |         (void)write(sockfd, &cmd, sizeof(command_t)); | ||||||
| #endif | #endif | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -140,7 +140,7 @@ public: | |||||||
| #ifdef _WIN32 | #ifdef _WIN32 | ||||||
|         recv(sock, (char*)buf, count, 0); |         recv(sock, (char*)buf, count, 0); | ||||||
| #else | #else | ||||||
|         read(sockfd, buf, count); |         (void)read(sockfd, buf, count); | ||||||
| #endif | #endif | ||||||
|     } |     } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -384,13 +384,15 @@ private: | |||||||
|  |  | ||||||
|         if (_this->running) { style::endDisabled(); } |         if (_this->running) { style::endDisabled(); } | ||||||
|  |  | ||||||
|         ImGui::Text("Antenna"); |         if (_this->antennaList.size() > 1) { | ||||||
|         ImGui::SameLine(); |             ImGui::Text("Antenna"); | ||||||
|         ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); |             ImGui::SameLine(); | ||||||
|         if (ImGui::Combo(CONCAT("##_antenna_select_", _this->name), &_this->uiAntennaId, _this->txtAntennaList.c_str())) { |             ImGui::SetNextItemWidth(menuWidth - ImGui::GetCursorPosX()); | ||||||
|             if (_this->running) |             if (ImGui::Combo(CONCAT("##_antenna_select_", _this->name), &_this->uiAntennaId, _this->txtAntennaList.c_str())) { | ||||||
|                 _this->dev->setAntenna(SOAPY_SDR_RX, _this->channelId, _this->antennaList[_this->uiAntennaId]); |                 if (_this->running) | ||||||
|             _this->saveCurrent(); |                     _this->dev->setAntenna(SOAPY_SDR_RX, _this->channelId, _this->antennaList[_this->uiAntennaId]); | ||||||
|  |                 _this->saveCurrent(); | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         float gainNameLen = 0; |         float gainNameLen = 0; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user