From b2fcbef0846f63a73c174b11e742ba3c527fedb2 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 23 Jun 2021 08:54:40 -0400 Subject: [PATCH] only open python if not sim mode --- afsk/main.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/afsk/main.c b/afsk/main.c index a56cfe89..c596c8f4 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -618,18 +618,21 @@ int main(int argc, char * argv[]) { get_tlm_fox(); firstTime = 1; - strcpy(pythonStr, pythonCmd); - strcat(pythonStr, busStr); - strcat(pythonConfigStr, pythonStr); - strcat(pythonConfigStr, " c"); + if (!sim_mode) + { + strcpy(pythonStr, pythonCmd); + strcat(pythonStr, busStr); + strcat(pythonConfigStr, pythonStr); + strcat(pythonConfigStr, " c"); - fprintf(stderr, "pythonConfigStr: %s\n", pythonConfigStr); + fprintf(stderr, "pythonConfigStr: %s\n", pythonConfigStr); - file1 = sopen(pythonConfigStr); // python sensor polling function + file1 = sopen(pythonConfigStr); // python sensor polling function - fgets(cmdbuffer, 1000, file1); - fprintf(stderr, "pythonStr result: %s\n", cmdbuffer); - + fgets(cmdbuffer, 1000, file1); + fprintf(stderr, "pythonStr result: %s\n", cmdbuffer); + } + long int loopTime; loopTime = millis();