From 259fd832214c0302358538517db909e26d364d71 Mon Sep 17 00:00:00 2001 From: alon Date: Mon, 24 Jun 2024 09:18:32 +0300 Subject: [PATCH] up --- .../gr-caribouLite/lib/caribouLiteSource_impl.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/software/gr-caribouLite/lib/caribouLiteSource_impl.cc b/software/gr-caribouLite/lib/caribouLiteSource_impl.cc index e4ffba11..54b521c4 100644 --- a/software/gr-caribouLite/lib/caribouLiteSource_impl.cc +++ b/software/gr-caribouLite/lib/caribouLiteSource_impl.cc @@ -109,14 +109,15 @@ namespace gr { auto out_meta = _provide_meta == true ? static_cast(output_items[1]) : (uint8_t*) NULL ; int read_samples = _radio->ReadSamples(out_samples, static_cast(noutput_items), out_meta); if (read_samples <= 0) { return 0;} - - for (int i = 0; i < read_samples; i++) - { - if (out_meta[i] == 1) { - add_item_tag(0, i, pmt::string_to_symbol("pps") ,pmt::from_bool(true)); + + if (_provide_meta) { + for (int i = 0; i < read_samples; i++) + { + if (out_meta[i] == 1) { + add_item_tag(0, i, pmt::string_to_symbol("pps") ,pmt::from_bool(true)); + } } } - return read_samples; }