This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Piotr Krysik gerrit-no-reply at lists.osmocom.orgPiotr Krysik has submitted this change and it was merged. ( https://gerrit.osmocom.org/10930 ) Change subject: apps/grgsm_trx: remove unnecessary checks of freq_offset ...................................................................... apps/grgsm_trx: remove unnecessary checks of freq_offset Checking if freq_offset is None doesn't make sense currently as it's always set to a float value by argparse (to 0 by default). Change-Id: Ie8bae1ccde60d07fc25e0b874afa5aaaac04d8a7 --- M apps/grgsm_trx M python/trx/radio_if.py 2 files changed, 8 insertions(+), 15 deletions(-) Approvals: Piotr Krysik: Looks good to me, approved; Verified diff --git a/apps/grgsm_trx b/apps/grgsm_trx index 5c3dace..b53d12a 100755 --- a/apps/grgsm_trx +++ b/apps/grgsm_trx @@ -66,10 +66,6 @@ self.phy_freq_offset_hz, self.bind_addr, self.remote_addr, self.base_port) - # Optional frequency offset - if self.phy_freq_offset_hz is not None: - self.radio.freq_offset_hz = self.phy_freq_offset_hz - # Power measurement emulation # Noise: -120 .. -105 # BTS: -75 .. -50 diff --git a/python/trx/radio_if.py b/python/trx/radio_if.py index 11f1d40..a9b0358 100644 --- a/python/trx/radio_if.py +++ b/python/trx/radio_if.py @@ -60,7 +60,6 @@ class radio_if(gr.top_block): # PHY specific variables - freq_offset_hz = None rx_freq = 935e6 tx_freq = 890e6 osr = 4 @@ -280,21 +279,19 @@ return self.ppm / 1.0e6 * 2 * pi * fc / self.sample_rate def set_rx_freq(self, fc): - if self.freq_offset_hz is not None: - fc += self.freq_offset_hz - print("[#] Shifting RX freq. to %s (offset is %s)" - % (eng_notation.num_to_str(fc), - eng_notation.num_to_str(self.freq_offset_hz))) + fc += self.freq_offset_hz + print("[#] Shifting RX freq. to %s (offset is %s)" + % (eng_notation.num_to_str(fc), + eng_notation.num_to_str(self.freq_offset_hz))) 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): - if self.freq_offset_hz is not None: - fc += self.freq_offset_hz - print("[#] Shifting TX freq. to %s (offset is %s)" - % (eng_notation.num_to_str(fc), - eng_notation.num_to_str(self.freq_offset_hz))) + fc += self.freq_offset_hz + print("[#] Shifting TX freq. to %s (offset is %s)" + % (eng_notation.num_to_str(fc), + eng_notation.num_to_str(self.freq_offset_hz))) 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/10930 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: gr-gsm Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie8bae1ccde60d07fc25e0b874afa5aaaac04d8a7 Gerrit-Change-Number: 10930 Gerrit-PatchSet: 1 Gerrit-Owner: Piotr Krysik <ptrkrysik at gmail.com> Gerrit-Reviewer: Piotr Krysik <ptrkrysik at gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180913/59494584/attachment.htm>