#986 Resolves issue with HackRF tuner not loading correctly. (#987)

Co-authored-by: Denny <denny@denny-desktop>
This commit is contained in:
Denny Sheirer
2020-10-26 04:26:29 -04:00
committed by GitHub
parent f4f3db7436
commit d34460c4e3

View File

@@ -288,6 +288,8 @@ public class HackRFTunerController extends USBTunerController
*/ */
public void setLNAGain(HackRFLNAGain gain) throws UsbException public void setLNAGain(HackRFLNAGain gain) throws UsbException
{ {
mLock.lock();
try try
{ {
int result = readByte(Request.SET_LNA_GAIN, 0, gain.getValue(), true); int result = readByte(Request.SET_LNA_GAIN, 0, gain.getValue(), true);
@@ -398,8 +400,7 @@ public class HackRFTunerController extends USBTunerController
} }
catch(UsbException e) catch(UsbException e)
{ {
throw new SourceException("Error while applying tuner " throw new SourceException("Error while applying tuner configuration", e);
+ "configuration", e);
} }
try try
@@ -413,8 +414,7 @@ public class HackRFTunerController extends USBTunerController
} }
else else
{ {
throw new IllegalArgumentException("Invalid tuner configuration " throw new IllegalArgumentException("Invalid tuner configuration type [" + config.getClass() + "]");
+ "type [" + config.getClass() + "]");
} }
} }