From 6172e8e83e14de6e14ce6aa019a88f17067e95db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 27 Jul 2025 12:13:38 -0400 Subject: [PATCH] Update main.c getchars until empty --- main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index e1959111..0a62003d 100644 --- a/main.c +++ b/main.c @@ -2102,7 +2102,13 @@ int get_payload_serial(int debug_camera) { end_flag_detected = FALSE; jpeg_start = 0; - serialFlush (uart_fd); // flush serial buffer so latest payload is read +// serialFlush (uart_fd); // flush serial buffer so latest payload is read + + while (serialDataAvail(uart_fd)) { + (void) serialGetchar(uart_fd); +// printf("%c", octet); +// fflush(stdout); + } // #ifdef GET_IMAGE_DEBUG if (debug_camera)