mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Display clear HackRF One channel limit error
Signed-off-by: Ceres2805 <aritrabera2805@gmail.com>
This commit is contained in:
		| @@ -152,11 +152,20 @@ OsmosdrSignalSource::OsmosdrSignalSource(const ConfigurationInterface* configura | |||||||
|             LOG(ERROR) << "A signal source does not have an input stream"; |             LOG(ERROR) << "A signal source does not have an input stream"; | ||||||
|         } |         } | ||||||
|     if (out_stream_ > 1) |     if (out_stream_ > 1) | ||||||
|  |         { | ||||||
|  |             if (osmosdr_args_.find("hackrf") != std::string::npos) | ||||||
|  |             { | ||||||
|  |                 LOG(ERROR) << "HackRF One hardware supports only one output stream. " | ||||||
|  |                            << "Please update your configuration to use only one channel."; | ||||||
|  |             } | ||||||
|  |             else | ||||||
|             { |             { | ||||||
|                 LOG(ERROR) << "This implementation only supports one output stream"; |                 LOG(ERROR) << "This implementation only supports one output stream"; | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|          |          | ||||||
|  | } | ||||||
|  |  | ||||||
|  |  | ||||||
| void OsmosdrSignalSource::driver_instance() | void OsmosdrSignalSource::driver_instance() | ||||||
| { | { | ||||||
| @@ -167,6 +176,14 @@ void OsmosdrSignalSource::driver_instance() | |||||||
|                     std::cout << "OsmoSdr arguments: " << osmosdr_args_ << '\n'; |                     std::cout << "OsmoSdr arguments: " << osmosdr_args_ << '\n'; | ||||||
|                     LOG(INFO) << "OsmoSdr arguments: " << osmosdr_args_; |                     LOG(INFO) << "OsmoSdr arguments: " << osmosdr_args_; | ||||||
|                 } |                 } | ||||||
|  |                 if (osmosdr_args_.find("hackrf") != std::string::npos && out_stream_ > 1) | ||||||
|  |                     { | ||||||
|  |                         LOG(ERROR) << "HackRF One supports only a single RF channel. You have configured "  | ||||||
|  |                                    << out_stream_ << " output streams. Please update your configuration to use " | ||||||
|  |                                    << "only one channel with this device."; | ||||||
|  |                         throw std::invalid_argument("HackRF One supports only a single RF channel"); | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|             osmosdr_source_ = osmosdr::source::make(osmosdr_args_); |             osmosdr_source_ = osmosdr::source::make(osmosdr_args_); | ||||||
|         } |         } | ||||||
|     catch (const boost::exception& e) |     catch (const boost::exception& e) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ceres2805
					Ceres2805