From c5433affea877e73a98505f174c70374c0980987 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 23 May 2011 16:20:30 -0600 Subject: [PATCH] src-avr: Move logging printfs out of ISR call chain Probably not the best plan to call printf from an interrupt handler. Signed-off-by: Keith Packard --- src-avr/ao_log_telescience.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src-avr/ao_log_telescience.c b/src-avr/ao_log_telescience.c index bda89129..04e494fd 100644 --- a/src-avr/ao_log_telescience.c +++ b/src-avr/ao_log_telescience.c @@ -88,7 +88,6 @@ ao_log_valid(struct ao_log_telescience *log) void ao_log_start(void) { - printf("Log goes from %ld to %ld\n", ao_log_current_pos, ao_log_end_pos); ao_log_running = 1; ao_wakeup(&ao_log_running); } @@ -96,7 +95,6 @@ ao_log_start(void) void ao_log_stop(void) { - printf ("Log stopped at %ld\n", ao_log_current_pos); ao_log_running = 0; ao_wakeup((void *) &ao_adc_head); } @@ -159,10 +157,13 @@ ao_log_set(void) { ao_cmd_hex(); if (ao_cmd_status == ao_cmd_success) { - if (ao_cmd_lex_i) + if (ao_cmd_lex_i) { + printf("Logging from %ld to %ld\n", ao_log_current_pos, ao_log_end_pos); ao_log_start(); - else + } else { + printf ("Log stopped at %ld\n", ao_log_current_pos); ao_log_stop(); + } } } -- 2.30.2