<p>Piotr Krysik <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/12636">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Harald Welte: Looks good to me, but someone else must approve
  Piotr Krysik: Looks good to me, approved; Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">trx/radio_if.py: do not print anything if freq. shift is 0<br><br>Change-Id: I100ce2ab8effc00e164e13253894445bdc816f06<br>---<br>M python/trx/radio_if.py<br>1 file changed, 10 insertions(+), 8 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/python/trx/radio_if.py b/python/trx/radio_if.py</span><br><span>index ec9cd5f..4032850 100644</span><br><span>--- a/python/trx/radio_if.py</span><br><span>+++ b/python/trx/radio_if.py</span><br><span>@@ -276,19 +276,21 @@</span><br><span>            return self.ppm / 1.0e6 * 2 * pi * fc / self.sample_rate</span><br><span> </span><br><span>         def set_rx_freq(self, fc):</span><br><span style="color: hsl(0, 100%, 40%);">-              fc += self.freq_offset</span><br><span style="color: hsl(0, 100%, 40%);">-          print("[#] Shifting RX freq. to %s (offset is %s)"</span><br><span style="color: hsl(0, 100%, 40%);">-                    % (eng_notation.num_to_str(fc),</span><br><span style="color: hsl(0, 100%, 40%);">-                         eng_notation.num_to_str(self.freq_offset)))</span><br><span style="color: hsl(120, 100%, 40%);">+           if self.freq_offset != 0:</span><br><span style="color: hsl(120, 100%, 40%);">+                     fc += self.freq_offset</span><br><span style="color: hsl(120, 100%, 40%);">+                        print("[#] Shifting RX freq. to %s (offset is %s)"</span><br><span style="color: hsl(120, 100%, 40%);">+                          % (eng_notation.num_to_str(fc),</span><br><span style="color: hsl(120, 100%, 40%);">+                                       eng_notation.num_to_str(self.freq_offset)))</span><br><span>          self.phy_src.set_center_freq(fc, 0)</span><br><span>          self.rotator_src.set_phase_inc(self.calc_phase_inc(fc))</span><br><span>              self.rx_freq = fc</span><br><span> </span><br><span>        def set_tx_freq(self, fc):</span><br><span style="color: hsl(0, 100%, 40%);">-              fc += self.freq_offset</span><br><span style="color: hsl(0, 100%, 40%);">-          print("[#] Shifting TX freq. to %s (offset is %s)"</span><br><span style="color: hsl(0, 100%, 40%);">-                    % (eng_notation.num_to_str(fc),</span><br><span style="color: hsl(0, 100%, 40%);">-                         eng_notation.num_to_str(self.freq_offset)))</span><br><span style="color: hsl(120, 100%, 40%);">+           if self.freq_offset != 0:</span><br><span style="color: hsl(120, 100%, 40%);">+                     fc += self.freq_offset</span><br><span style="color: hsl(120, 100%, 40%);">+                        print("[#] Shifting TX freq. to %s (offset is %s)"</span><br><span style="color: hsl(120, 100%, 40%);">+                          % (eng_notation.num_to_str(fc),</span><br><span style="color: hsl(120, 100%, 40%);">+                                       eng_notation.num_to_str(self.freq_offset)))</span><br><span>          self.phy_sink.set_center_freq(fc, 0)</span><br><span>                 self.rotator_sink.set_phase_inc(-self.calc_phase_inc(fc))</span><br><span>            self.tx_freq = fc</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/12636">change 12636</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12636"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: gr-gsm </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: I100ce2ab8effc00e164e13253894445bdc816f06 </div>
<div style="display:none"> Gerrit-Change-Number: 12636 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Piotr Krysik <ptrkrysik@gmail.com> </div>