From aa43cd5540cc8138015c3d75ab3eeea472f4cd81 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Sat, 29 Aug 2020 20:03:42 -0400 Subject: [PATCH] Update main.c --- afsk/main.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/afsk/main.c b/afsk/main.c index aab817c2..dbb1b195 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -805,14 +805,17 @@ for (int j = 0; j < frameCnt; j++) if (token != NULL) { voltage[count1] = atof(token); - printf("voltage: %f ", voltage[count1]); - + #ifdef DEBUG_LOGGING + printf("voltage: %f ", voltage[count1]); + #endif token = strtok(NULL, space); if (token != NULL) { current[count1] = atof(token); - printf("current: %f\n", current[count1]); - token = strtok(NULL, space); + #ifdef DEBUG_LOGGING + printf("current: %f\n", current[count1]); + #endif + token = strtok(NULL, space); } } } @@ -1138,14 +1141,17 @@ if (firstTime != ON) if (token != NULL) { voltage[count1] = atof(token); - printf("voltage: %f ", voltage[count1]); - + #ifdef DEBUG_LOGGING + printf("voltage: %f ", voltage[count1]); + #endif token = strtok(NULL, space); if (token != NULL) { current[count1] = atof(token); - printf("current: %f\n", current[count1]); - token = strtok(NULL, space); + #ifdef DEBUG_LOGGING + printf("current: %f\n", current[count1]); + #endif + token = strtok(NULL, space); } } }