From 9e6e0be362376b91dda8777137b030e9087c5cb5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 31 Aug 2024 20:58:45 -0400 Subject: [PATCH] Update main.c add C to cw6.txt if C2C enabled --- main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 594f1ca0..4dd3e610 100644 --- a/main.c +++ b/main.c @@ -1064,7 +1064,6 @@ void get_tlm(void) { char header_lat[10]; char header_long[10]; char header_str4[] = "hi hi de "; - char command_string[] = " C"; // char footer_str1[] = "\' > t.txt && echo \'"; char footer_str1[] = "\' > t.txt"; // char footer_str[] = "-11>APCSS:010101/hi hi ' >> t.txt && touch /home/pi/CubeSatSim/ready"; // transmit is done by rpitx.py @@ -1135,6 +1134,10 @@ void get_tlm(void) { pclose(cw_file); } + if (c2cStatus != 0) { + FILE *file_append = sopen("echo ' C' >> cw6.txt"); + fclose(file_append); + } } else { // APRS sprintf(tlm_str, "BAT %4.2f %5.1f ", voltage[map[BAT]] , current[map[BAT]] ); @@ -1147,10 +1150,6 @@ void get_tlm(void) { if (mode != CW) strcat(str, sensor_payload); // append to telemetry string for transmission - if (c2cStatus != 0) - strcat(str, command_string); // append command and controls string -// printf(" Str so far: %s\n", str); - if (mode == CW) { // char cw_str2[1000];