1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
From 5866f81d6ce1e3c968e7980c3bd52c8289c4fd86 Mon Sep 17 00:00:00 2001
From: Michael Ossmann <mike@ossmann.com>
Date: Sat, 24 Sep 2022 20:11:23 -0400
Subject: [PATCH 3/4] actually call hackrf_set_amp_enable()
---
HackRF_Settings.cpp | 4 ----
1 file changed, 4 deletions(-)
diff --git a/HackRF_Settings.cpp b/HackRF_Settings.cpp
index d50d98d..277679c 100644
--- a/HackRF_Settings.cpp
+++ b/HackRF_Settings.cpp
@@ -362,9 +362,6 @@ void SoapyHackRF::setGain( const int direction, const size_t channel, const std:
_tx_stream.amp_gain=_current_amp;
}
- if( ((direction == SOAPY_SDR_RX) && (_current_mode == HACKRF_TRANSCEIVER_MODE_RX))
- || ((direction == SOAPY_SDR_TX) && (_current_mode == HACKRF_TRANSCEIVER_MODE_TX)) )
- {
if ( _dev != NULL )
{
int ret = hackrf_set_amp_enable( _dev, (_current_amp > 0)?1 : 0 );
@@ -373,7 +370,6 @@ void SoapyHackRF::setGain( const int direction, const size_t channel, const std:
SoapySDR::logf( SOAPY_SDR_ERROR, "hackrf_set_amp_enable(%f) returned %s", _current_amp, hackrf_error_name( (hackrf_error) ret ) );
}
}
- }
}else if ( direction == SOAPY_SDR_RX and name == "LNA" )
{
_rx_stream.lna_gain = value;
--
2.47.3
|