From bcecb945a566275bacb11c089d9648e2f992adc0 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Thu, 4 Jan 2024 05:25:39 +0000 Subject: [PATCH] percentage. --- gamutrf/grsource.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gamutrf/grsource.py b/gamutrf/grsource.py index cc93f316..ea1bc625 100644 --- a/gamutrf/grsource.py +++ b/gamutrf/grsource.py @@ -63,6 +63,7 @@ def __init__( self.set_msg_handler(pmt.intern(cmd_port), self.handle_cmd) self.need_tags = False self.tags_sent = 0 + logging.info("opened %s with %u samples", input_file, self.n_samples) def complete(self): return self.i >= self.n_samples @@ -81,6 +82,7 @@ def add_tags(self): sample_time = self.ctime + ( (self.tags_sent * self.nfft * self.tune_step_fft) / float(self.sample_rate) ) + logging.info("%.1f%%", self.i / self.n_samples * 100) sample_sec = int(sample_time) sample_fsec = sample_time - sample_sec pmt_sample_time = pmt.make_tuple( @@ -95,6 +97,7 @@ def add_tags(self): def general_work(self, input_items, output_items): if self.complete(): + logging.info("100%%") return -1 if self.need_tags: self.add_tags()