apps/grgsm_trx: remove redundant unit from freq_offset variable name

Frequency is always in Hz so there is no need to add that
information in the variable name.

Change-Id: I509771c3fe072069a680f66b0763ae6825f6d529
This commit is contained in:
Piotr Krysik 2018-09-13 15:42:55 +02:00 committed by Vadim Yanitskiy
parent b775afd672
commit b8632ffdac
2 changed files with 8 additions and 8 deletions

View File

@ -52,7 +52,7 @@ class Application:
self.phy_tx_gain = argv.tx_gain
self.phy_rx_antenna = argv.rx_antenna
self.phy_tx_antenna = argv.tx_antenna
self.phy_freq_offset_hz = argv.freq_offset
self.phy_freq_offset = argv.freq_offset
self.phy_ppm = argv.ppm
# Set up signal handlers
@ -63,7 +63,7 @@ class Application:
self.radio = radio_if(self.phy_args, self.phy_sample_rate,
self.phy_rx_gain, self.phy_tx_gain, self.phy_ppm,
self.phy_rx_antenna, self.phy_tx_antenna,
self.phy_freq_offset_hz, self.bind_addr,
self.phy_freq_offset, self.bind_addr,
self.remote_addr, self.base_port)
# Power measurement emulation

View File

@ -85,7 +85,7 @@ class radio_if(gr.top_block):
def __init__(self, phy_args, phy_sample_rate,
phy_rx_gain, phy_tx_gain, phy_ppm,
phy_rx_antenna, phy_tx_antenna,
phy_freq_offset_hz, trx_bind_addr,
phy_freq_offset, trx_bind_addr,
trx_remote_addr, trx_base_port):
print("[i] Init Radio interface (L:%s:%u <-> R:%s:%u)"
@ -97,7 +97,7 @@ class radio_if(gr.top_block):
self.rx_gain = phy_rx_gain
self.tx_gain = phy_tx_gain
self.ppm = phy_ppm
self.freq_offset_hz = phy_freq_offset_hz
self.freq_offset = phy_freq_offset
gr.top_block.__init__(self, "GR-GSM TRX")
@ -279,19 +279,19 @@ class radio_if(gr.top_block):
return self.ppm / 1.0e6 * 2 * pi * fc / self.sample_rate
def set_rx_freq(self, fc):
fc += self.freq_offset_hz
fc += self.freq_offset
print("[#] Shifting RX freq. to %s (offset is %s)"
% (eng_notation.num_to_str(fc),
eng_notation.num_to_str(self.freq_offset_hz)))
eng_notation.num_to_str(self.freq_offset)))
self.phy_src.set_center_freq(fc, 0)
self.rotator_src.set_phase_inc(self.calc_phase_inc(fc))
self.rx_freq = fc
def set_tx_freq(self, fc):
fc += self.freq_offset_hz
fc += self.freq_offset
print("[#] Shifting TX freq. to %s (offset is %s)"
% (eng_notation.num_to_str(fc),
eng_notation.num_to_str(self.freq_offset_hz)))
eng_notation.num_to_str(self.freq_offset)))
self.phy_sink.set_center_freq(fc, 0)
self.rotator_sink.set_phase_inc(-self.calc_phase_inc(fc))
self.tx_freq = fc