summaryrefslogtreecommitdiffstats
path: root/src/ufo-roof-read-task.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ufo-roof-read-task.c')
-rw-r--r--src/ufo-roof-read-task.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ufo-roof-read-task.c b/src/ufo-roof-read-task.c
index a8ddded..7d55b79 100644
--- a/src/ufo-roof-read-task.c
+++ b/src/ufo-roof-read-task.c
@@ -190,6 +190,21 @@ ufo_roof_read_task_generate (UfoTask *task,
return FALSE;
}
+#ifdef UFO_ROOF_DEBUG
+ // Store first received packet on each channel...
+ static int debug = 1;
+ if (debug) {
+ char fname[256];
+ sprintf(fname, "channel%i_packet0.raw", priv->id);
+ FILE *f = fopen(fname, "w");
+ if (f) {
+ fwrite(output_buffer, 1, cfg->max_packets * cfg->max_packet_size, f);
+ fclose(f);
+ }
+ debug = 0;
+ }
+#endif /* UFO_ROOF_DEBUG */
+
// FIXME: End of data (shall we restart in the network case?)
if (!packets)
return FALSE;