Piotr Krysik has uploaded this change for review. ( 
https://gerrit.osmocom.org/10933


Change subject: apps/grgsm_trx: remove redundant unit from freq_offset variable 
name
......................................................................

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
---
M apps/grgsm_trx
M python/trx/radio_if.py
2 files changed, 8 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/gr-gsm refs/changes/33/10933/1

diff --git a/apps/grgsm_trx b/apps/grgsm_trx
index b53d12a..efb9c24 100755
--- a/apps/grgsm_trx
+++ b/apps/grgsm_trx
@@ -52,7 +52,7 @@
                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 @@
                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
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 @@
        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 @@
                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 @@
                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

--
To view, visit https://gerrit.osmocom.org/10933
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: gr-gsm
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I509771c3fe072069a680f66b0763ae6825f6d529
Gerrit-Change-Number: 10933
Gerrit-PatchSet: 1
Gerrit-Owner: Piotr Krysik <[email protected]>

Reply via email to