Skip to content

Commit

Permalink
Merge pull request #1256 from anarkiwi/inf3
Browse files Browse the repository at this point in the history
Add inference output to sample write.
  • Loading branch information
anarkiwi authored May 6, 2024
2 parents eda12a8 + 8dc0821 commit 6781809
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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.95
RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.96
COPY --from=iqtlabs/gamutrf-vkfft:latest /root /root/gr-iqtlabs
WORKDIR /root/gr-iqtlabs/build
COPY --from=iqtlabs/gamutrf-sigmf:latest /usr/local /usr/local
Expand Down
8 changes: 8 additions & 0 deletions gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ def __init__(
self.last_db_block = self.fft_blocks[-1]
fft_dir = ""
self.samples_blocks = []
self.write_samples_block = None
if write_samples:
fft_dir = sample_dir
Path(sample_dir).mkdir(parents=True, exist_ok=True)
Expand Down Expand Up @@ -211,6 +212,8 @@ def __init__(
),
]
)
self.write_samples_block = self.samples_blocks[-1]

retune_fft = self.iqtlabs.retune_fft(
tag="rx_freq",
nfft=nfft,
Expand Down Expand Up @@ -314,6 +317,11 @@ def __init__(
power_inference=iq_power_inference,
)
self.inference_blocks.append(self.iq_inference_block)
if self.write_samples_block:
self.msg_connect(
(self.iq_inference_block, "inference"),
(self.write_samples_block, "inference"),
)

# TODO: provide new block that receives JSON-over-PMT and outputs to MQTT/zmq.
retune_fft_output_block = None
Expand Down

0 comments on commit 6781809

Please sign in to comment.