diff options
author | Piotr Krysik <ptrkrysik@gmail.com> | 2018-09-13 15:42:55 +0200 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-09-13 16:34:35 +0000 |
commit | b8632ffdace4021cd34207969ddb27c2463a3a48 (patch) | |
tree | 5fd7af1849dbd3e9e02ead635cfdd0285eed970c /python/trx/radio_if.py | |
parent | b775afd6725d0fbff668683daa3ef4fa31d18320 (diff) |
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
Diffstat (limited to 'python/trx/radio_if.py')
-rw-r--r-- | python/trx/radio_if.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/trx/radio_if.py b/python/trx/radio_if.py index a9b0358..85970a9 100644 --- a/python/trx/radio_if.py +++ b/python/trx/radio_if.py @@ -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 |