diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-01-19 10:20:59 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-01-19 11:29:28 +0700 |
commit | baebe451cd90e16de491d5e69a36fd2493802cba (patch) | |
tree | fe9942f599cd6ddf4f41481880a30de776df6b68 /python | |
parent | b7a272e3f0aa22dfd6af0dd68b0e39dab885a603 (diff) |
trx/ctrl_if_bb.py: reset transceiver on POWEROFF
Change-Id: I1e7f74c56388a431794a0b32b8a9537c360f5d33
Diffstat (limited to 'python')
-rw-r--r-- | python/trx/ctrl_if_bb.py | 3 | ||||
-rw-r--r-- | python/trx/radio_if.py | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/python/trx/ctrl_if_bb.py b/python/trx/ctrl_if_bb.py index f9840d4..0e194d0 100644 --- a/python/trx/ctrl_if_bb.py +++ b/python/trx/ctrl_if_bb.py @@ -63,6 +63,9 @@ class CTRLInterfaceBB(CTRLInterface): self.tb.stop() self.tb.wait() + # POWEROFF is also used to reset transceiver + self.tb.reset() + return 0 # Gain control diff --git a/python/trx/radio_if.py b/python/trx/radio_if.py index e15add2..ed5a8de 100644 --- a/python/trx/radio_if.py +++ b/python/trx/radio_if.py @@ -269,6 +269,12 @@ class RadioInterface(gr.top_block): return True + def reset(self): + # TODO: do we need to reset both RX / TX freq.? + # self.rx_freq = None + # self.tx_freq = None + self.set_ta(0) + def calc_phase_inc(self, fc): return self.ppm / 1.0e6 * 2 * pi * fc / self.sample_rate |