fix EEPROM always on bias tee

master
rtlsdrblog 5 years ago
parent 65ea7235bc
commit 9b900be7c6
  1. BIN
      build/src/librtlsdr.a
  2. BIN
      build/src/librtlsdr.so.0.6git
  3. 4
      src/librtlsdr.c

Binary file not shown.

Binary file not shown.

@ -2026,7 +2026,7 @@ int rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on)
if (!dev) if (!dev)
return -1; return -1;
if(dev->force_bt) return 1; // If force_bt is on from the EEPROM, do not allow bias tee to turn off if(dev->force_bt) on = 1; // If force_bt is on from the EEPROM, do not allow bias tee to turn off
rtlsdr_set_gpio_output(dev, 0); rtlsdr_set_gpio_output(dev, 0);
rtlsdr_set_gpio_bit(dev, 0, on); rtlsdr_set_gpio_bit(dev, 0, on);
@ -2039,7 +2039,7 @@ int rtlsdr_set_gpio(rtlsdr_dev_t *dev, int gpio_pin, int on)
if (!dev) if (!dev)
return -1; return -1;
if(dev->force_bt) return 1; // If force_bt is on from the EEPROM, do not allow bias tee to turn off if(dev->force_bt) on = 1; // If force_bt is on from the EEPROM, do not allow bias tee to turn off
rtlsdr_set_gpio_output(dev, gpio_pin); rtlsdr_set_gpio_output(dev, gpio_pin);
rtlsdr_set_gpio_bit(dev, gpio_pin, on); rtlsdr_set_gpio_bit(dev, gpio_pin, on);

Loading…
Cancel
Save