bin/pwn_gqrx_scanner in pwn-0.5.61 vs bin/pwn_gqrx_scanner in pwn-0.5.62

- old
+ new

@@ -181,10 +181,18 @@ # DEBUG # puts response.inspect # puts response.length response +rescue RuntimeError => e + puts 'WARNING: RF Gain is not supported by the radio backend.' if e.message.include?('Command: L RF_GAIN') + puts 'WARNING: Intermediate Gain is not supported by the radio backend.' if e.message.include?('Command: L IF_GAIN') + puts 'WARNING: Baseband Gain is not supported by the radio backend.' if e.message.include?('Command: L BB_GAIN') + + raise e unless e.message.include?('Command: L RF_GAIN') || + e.message.include?('Command: L IF_GAIN') || + e.message.include?('Command: L BB_GAIN') end def init_freq(opts = {}) gqrx_sock = opts[:gqrx_sock] demodulator_mode = opts[:demodulator_mode] @@ -401,26 +409,26 @@ strength_lock = opts[:strength_lock] ||= -60.0 strength_lock = strength_lock.to_f rf_gain = opts[:rf_gain] ||= 0.0 rf_gain = rf_gain.to_f - squelch_resp = gqrx_cmd( + rf_gain_resp = gqrx_cmd( gqrx_sock: gqrx_sock, cmd: "L RF_GAIN #{rf_gain}", resp_ok: 'RPRT 0' ) intermediate_gain = opts[:intermediate_gain] ||= 32.0 intermediate_gain = intermediate_gain.to_f - squelch_resp = gqrx_cmd( + intermediate_resp = gqrx_cmd( gqrx_sock: gqrx_sock, cmd: "L IF_GAIN #{intermediate_gain}", resp_ok: 'RPRT 0' ) baseband_gain = opts[:baseband_gain] ||= 10.0 baseband_gain = baseband_gain.to_f - squelch_resp = gqrx_cmd( + baseband_resp = gqrx_cmd( gqrx_sock: gqrx_sock, cmd: "L BB_GAIN #{baseband_gain}", resp_ok: 'RPRT 0' )