sync: more logging

This commit is contained in:
Bastian Bloessl
2017-08-09 22:37:00 +01:00
parent 44561c1578
commit 6dc42c7f43
2 changed files with 5 additions and 4 deletions
+4 -4
View File
@@ -73,7 +73,7 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
d_copied = 0;
d_freq_offset = arg(in_abs[i]) / 16;
d_plateau = 0;
insert_tag(nitems_written(0), d_freq_offset);
insert_tag(nitems_written(0), d_freq_offset, nitems_read(0) + i);
dout << "SHORT Frame!" << std::endl;
break;
}
@@ -99,7 +99,7 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
d_copied = 0;
d_plateau = 0;
d_freq_offset = arg(in_abs[o]) / 16;
insert_tag(nitems_written(0) + o, d_freq_offset);
insert_tag(nitems_written(0) + o, d_freq_offset, nitems_read(0) + o);
dout << "SHORT Frame!" << std::endl;
break;
}
@@ -128,8 +128,8 @@ int general_work (int noutput_items, gr_vector_int& ninput_items,
return 0;
}
void insert_tag(uint64_t item, double freq_offset) {
mylog(boost::format("frame start at %1%") % item);
void insert_tag(uint64_t item, double freq_offset, uint64_t input_item) {
mylog(boost::format("frame start at in: %2% out: %1%") % item % input_item);
const pmt::pmt_t key = pmt::string_to_symbol("wifi_start");
const pmt::pmt_t value = pmt::from_double(freq_offset);