mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-09 15:17:24 -05:00
Check the I2CRepeater state before changing it. (#2197)
Resolves #1923 - 'USB Error 9' preventing configuration of rtl-sdr devices
This commit is contained in:
committed by
GitHub
parent
96f0b7dd55
commit
4afb74a847
@@ -579,7 +579,12 @@ public class RTL2832TunerController extends USBTunerController
|
||||
{
|
||||
short address = 1;
|
||||
int value = (enabled ? 0x18 : 0x10);
|
||||
writeDemodRegister(Page.ONE, address, value, 1);
|
||||
|
||||
boolean isEnabledAlready = isI2CRepeaterEnabled();
|
||||
if (isEnabledAlready != enabled) {
|
||||
// mLog.info("trying to " + (enabled ? "enable" : "disable") + " i2c repeater, which is currently " + (isEnabledAlready ? "enabled" : "disabled"));
|
||||
writeDemodRegister(Page.ONE, address, value, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user