Skip to content

Commit

Permalink
trx/radio_if.py: introduce a new @Property 'ready'
Browse files Browse the repository at this point in the history
Change-Id: I513da0f45c6a608d15fbd0e8eafe14d6af8833d7
  • Loading branch information
axilirator committed Jan 19, 2019
1 parent 1fe2825 commit b7a272e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/trx/radio_if.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,16 @@ def shutdown(self):
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

Expand Down

0 comments on commit b7a272e

Please sign in to comment.