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/12636 )
Change subject: trx/radio_if.py: do not print anything if freq. shift is 0
......................................................................
trx/radio_if.py: do not print anything if freq. shift is 0
Change-Id: I100ce2ab8effc00e164e13253894445bdc816f06
---
M python/trx/radio_if.py
1 file changed, 10 insertions(+), 8 deletions(-)
Approvals:
Harald Welte: Looks good to me, but someone else must approve
Piotr Krysik: Looks good to me, approved; Verified
diff --git a/python/trx/radio_if.py b/python/trx/radio_if.py
index ec9cd5f..4032850 100644
--- a/python/trx/radio_if.py
+++ b/python/trx/radio_if.py
@@ -276,19 +276,21 @@
return self.ppm / 1.0e6 * 2 * pi * fc / self.sample_rate
def set_rx_freq(self, fc):
- 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)))
+ if self.freq_offset != 0:
+ 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)))
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
- print("[#] Shifting TX freq. to %s (offset is %s)"
- % (eng_notation.num_to_str(fc),
- eng_notation.num_to_str(self.freq_offset)))
+ if self.freq_offset != 0:
+ 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)))
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/12636
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: I100ce2ab8effc00e164e13253894445bdc816f06
Gerrit-Change-Number: 12636
Gerrit-PatchSet: 1
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Piotr Krysik <ptrkrysik at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190205/88cdfa02/attachment.htm>