Skip to content

Commit

Permalink
Create more than one image per interval.
Browse files Browse the repository at this point in the history
  • Loading branch information
anarkiwi committed Dec 21, 2023
1 parent 96f3264 commit f268b6d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libvulkan-dev \
python3-numpy
WORKDIR /root
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.58
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.59
COPY --from=iqtlabs/gamutrf-vkfft:latest /root /root/gr-iqtlabs
WORKDIR /root/gr-iqtlabs/build
COPY --from=sigmf-builder /usr/local /usr/local
Expand Down
10 changes: 5 additions & 5 deletions gamutrf/grsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ def airt_workaround_start_hook(self):
self.sources[0].set_bandwidth(0, rate)


class file_source_tagger(gr.sync_block):
class file_source_tagger(gr.basic_block):
def __init__(
self,
input_file,
cmd_port,
):
gr.sync_block.__init__(
gr.basic_block.__init__(
self,
name="file_source_tagger",
in_sig=None,
Expand Down Expand Up @@ -71,17 +71,17 @@ def add_tags(self):
pmt.from_double(self.center_freq),
)

def work(self, input_items, output_items):
def general_work(self, input_items, output_items):
if self.complete():
return 0
return -1
if self.need_tags:
self.add_tags()
self.need_tags = False
n = len(output_items[0])
samples = self.samples[self.i : self.i + n]
if len(samples) < n:
self.i = self.n_samples
return 0
return -1
self.i += len(samples)
output_items[0][:] = samples
return len(samples)
Expand Down
6 changes: 2 additions & 4 deletions gamutrf/offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ def main():
"iqtlabs": iqtlabs,
"freq_end": 0,
"freq_start": freq_start,
"pretune": True,
"samp_rate": int(meta["sample_rate"]),
"sdr": "file:" + filename,
"pretune": True,
}
)
tb = grscan(**scan_args)
tb.start()
while not tb.sources[0].complete():
time.sleep(1)
tb.stop()
tb.wait()
tb.stop()

0 comments on commit f268b6d

Please sign in to comment.