diff --git a/gqrx-panadapter.py b/gqrx-panadapter.py index 1817e50..bcbf659 100755 --- a/gqrx-panadapter.py +++ b/gqrx-panadapter.py @@ -35,8 +35,8 @@ GQRX_WAIT = 4 delay_secs = 0.5 timeout = 0.0 -usb_if_offset = -2250 -lsb_if_offset = 0 +usb_if_offset = 0 #-2250 +lsb_if_offset = -1000 #0 rs = 0 gs = 0 @@ -48,11 +48,13 @@ def calc_lnb_lo(freq, ifreq, isusb=True): if isusb: if DEBUG: print('USB IF: ' + str(ifreq + usb_if_offset)) - return - freq - (ifreq - usb_if_offset) + #return - freq - (ifreq - usb_if_offset) + return freq + usb_if_offset - ifreq else: if DEBUG: print('LSB IF: ' + str(ifreq + lsb_if_offset)) - return - freq - (ifreq + lsb_if_offset) + #return - freq - (ifreq + lsb_if_offset) + return freq + lsb_if_offset - ifreq def get_rig_freq(rs): rs.send(b'm\n') @@ -77,13 +79,13 @@ def set_rig_freq(rs, gs, freq, ifreq, isusb): if DEBUG: print('Set GQRX Freq: {}'.format(freq).encode()) - gs.send('F {}'.format(-1 * freq).encode()) + gs.send('F {}'.format(freq).encode()) gs.recv(1024) def get_gqrx_freq(gs): gs.send(b'f\n') - return int(gs.recv(1024)) * -1 + return int(gs.recv(1024)) #* -1 def set_gqrx_freq(gs, freq, ifreq, isusb): lnb = calc_lnb_lo(freq, ifreq, isusb) @@ -97,7 +99,8 @@ def set_gqrx_freq(gs, freq, ifreq, isusb): if DEBUG: print('Set GQRX Freq: {}'.format(freq).encode()) - gs.send('F {}'.format(-1 * freq).encode()) + #gs.send('F {}'.format(-1 * freq).encode()) + gs.send('F {}'.format(freq).encode()) gs.recv(1024) def main():