From f25c282249135663520f64efb48a6e03c2ccdcc5 Mon Sep 17 00:00:00 2001 From: bsongis Date: Thu, 8 Dec 2011 19:48:40 +0000 Subject: [PATCH] Minor changes to avoid infinite loops inside companion9x --- src/gruvin9x.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gruvin9x.cpp b/src/gruvin9x.cpp index d1ca7bdd9..e84c8dd18 100644 --- a/src/gruvin9x.cpp +++ b/src/gruvin9x.cpp @@ -577,7 +577,9 @@ void checkTHR() //loop until all switches are reset while (1) { -#ifndef SIMU +#ifdef SIMU + if (!main_thread_running) return; +#else getADC_single(); #endif int16_t v = anaIn(thrchn);