*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
+ * the Free Software Foundation; either version 3, or (at your option)
* any later version.
*
* GNU Radio is distributed in the hope that it will be useful,
#include <gr_io_signature.h>
#include <stdexcept>
#include <gr_count_bits.h>
+#include <cstdio>
+
#define VERBOSE 0
{
const unsigned char *in = (const unsigned char *) input_items[0];
unsigned char *out = (unsigned char *) output_items[0];
-
+
for (int i = 0; i < noutput_items; i++){
// compute output value
// test for access code with up to threshold errors
new_flag = (nwrong <= d_threshold);
-#if 0
+#if VERBOSE
if(new_flag) {
- printf("%llx ==> %llx : d_flip=%u\n", d_access_code, d_data_reg, d_flip);
+ fprintf(stderr, "access code found: %llx\n", d_access_code);
+ }
+ else {
+ fprintf(stderr, "%llx ==> %llx\n", d_access_code, d_data_reg);
}
#endif