Skip to content
Snippets Groups Projects
Commit 1a013d2f authored by Daniel Meißner's avatar Daniel Meißner Committed by Daniel Meißner
Browse files

show live: added tranmission count

parent 5387c7fe
No related branches found
No related tags found
No related merge requests found
......@@ -107,6 +107,8 @@ def main(top_block_cls=top_block, options=None):
messages = []
time_added = 0
samples_len = 0
transmission_counter = 0
while True:
msg = tb.msgq_out.delete_head()
samples = np.fromstring(msg.to_string(), dtype='float32')
......@@ -129,6 +131,7 @@ def main(top_block_cls=top_block, options=None):
first_one = msg.index("1")
last_one = msg.rfind("1")
real_transmission_time = round(1/tb.samp_rate*(int(last_one-first_one)*1000), 2)
transmission_counter += 1
print(msg)
print("Transmission time: \t\t" + str(transmission_time) + "ms")
......@@ -136,6 +139,7 @@ def main(top_block_cls=top_block, options=None):
print("Transmission block starts at sample: \t" + str(block_samples_start))
print("Transmission starts at sample: \t\t" + str(block_samples_start + first_one))
print("Sample count: \t\t\t\t" + str(samples_count))
print("\nTransmissions: " + str(transmission_counter))
print("\n\n")
messages = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment