From d967f7708f0cb2a560f17cb96a60e53608ea565b Mon Sep 17 00:00:00 2001 From: maniacbug Date: Tue, 2 Aug 2011 21:00:31 -0700 Subject: [PATCH] Test refinement. IRQ test times out after not receiving anything, warning that you probably don't have interrupts hooked up. --- tests/pingpair_test/pingpair_test.pde | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/pingpair_test/pingpair_test.pde b/tests/pingpair_test/pingpair_test.pde index 60ecb6e..c16db2b 100644 --- a/tests/pingpair_test/pingpair_test.pde +++ b/tests/pingpair_test/pingpair_test.pde @@ -272,6 +272,13 @@ void loop(void) // Try again soon delay(interval); + + // Timeout if we have not received anything back ever + if ( ! last_message_count && millis() > interval * 10 ) + { + printf("No responses received. Are interrupts connected??\n\r"); + done = true; + } } // @@ -291,6 +298,9 @@ void loop(void) else printf("FAIL\n\r\n\r"); } + + // + // } void check_radio(void)