From c76d8235e238919683dc1abcc0b725c6ce22e3b8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 25 Oct 2025 14:26:06 -0400 Subject: [PATCH] Update main.c return true if present --- main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 9899e0b7..e325d311 100644 --- a/main.c +++ b/main.c @@ -2300,6 +2300,9 @@ int get_payload_serial(int debug_camera) { fflush(stdout); if (c == 'K') payload = ON; + buffer2[0] = 'O'; + buffer2[1] = 'K'; + buffer2[2] = 0; } } printf("\n"); @@ -2309,17 +2312,19 @@ int get_payload_serial(int debug_camera) { } if (payload == ON) { printf("\nSTEM Payload is present!\n"); - sleep(2); // delay to give payload time to get ready + sleep(2); // delay to give payload time to get ready + return(TRUE); } else { printf("\nSTEM Payload not present!\n -> Is STEM Payload programed and Serial1 set to 115200 baud?\n"); + return(FALSE); } } else { fprintf(stderr, "Unable to open UART: %s\n -> Did you configure /boot/config.txt and /boot/cmdline.txt?\n", strerror(errno)); + return(FALSE); } - #else index1 = 0; flag_count = 0;