trx/radio_if.py: introduce a new @property 'ready'
Change-Id: I513da0f45c6a608d15fbd0e8eafe14d6af8833d7
This commit is contained in:
parent
1fe28253b9
commit
b7a272e3f0
|
@ -259,6 +259,16 @@ class RadioInterface(gr.top_block):
|
|||
self.stop()
|
||||
self.wait()
|
||||
|
||||
@property
|
||||
def ready(self):
|
||||
# RX / TX frequencies shall be set
|
||||
if self.rx_freq is None:
|
||||
return False
|
||||
if self.tx_freq is None:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def calc_phase_inc(self, fc):
|
||||
return self.ppm / 1.0e6 * 2 * pi * fc / self.sample_rate
|
||||
|
||||
|
|
Loading…
Reference in New Issue