From b82472bb016648615371c6d2d0aa9c1fe1038c11 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sat, 28 May 2011 12:03:23 -0300 Subject: [PATCH] tools/atrf-path: added interactive dumping with D - sweep.h (print_sweep), atrf-path.c (print_sweep): make global, for sharing with gui.c - gui.c (gui): dump the sweep results to standard output if "D" is pressed --- tools/atrf-path/atrf-path.c | 2 +- tools/atrf-path/gui.c | 4 ++++ tools/atrf-path/sweep.h | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/atrf-path/atrf-path.c b/tools/atrf-path/atrf-path.c index ac39eaa..ee2f5e1 100644 --- a/tools/atrf-path/atrf-path.c +++ b/tools/atrf-path/atrf-path.c @@ -152,7 +152,7 @@ int do_sweep(const struct sweep *sweep, struct sample *res) } -static void print_sweep(const struct sweep *sweep, const struct sample *res) +void print_sweep(const struct sweep *sweep, const struct sample *res) { int chan; diff --git a/tools/atrf-path/gui.c b/tools/atrf-path/gui.c index b64e192..9bb7c3e 100644 --- a/tools/atrf-path/gui.c +++ b/tools/atrf-path/gui.c @@ -261,6 +261,10 @@ int gui(const struct sweep *sweep, int sweeps) if (cycle && !fail) return 1; break; + case SDLK_d: + if (cycle) + print_sweep(sweep, res); + break; case SDLK_q: return 0; default: diff --git a/tools/atrf-path/sweep.h b/tools/atrf-path/sweep.h index 80dcae4..b065b07 100644 --- a/tools/atrf-path/sweep.h +++ b/tools/atrf-path/sweep.h @@ -53,4 +53,6 @@ struct sample { int do_sweep(const struct sweep *sweep, struct sample *res); +void print_sweep(const struct sweep *sweep, const struct sample *res); + #endif /* !SWEEP_H */