Update main.c back to serialFlush

pull/380/head
Alan Johnston 5 months ago committed by GitHub
parent 2df1e474d5
commit ecaa6d51ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2102,15 +2102,15 @@ 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
int discard = 0;
while (serialDataAvail(uart_fd)) {
(void) serialGetchar(uart_fd);
discard++;
serialFlush (uart_fd); // flush serial buffer so latest payload is read
// int discard = 0;
// while (serialDataAvail(uart_fd)) {
// (void) serialGetchar(uart_fd);
// discard++;
// printf("%c", octet);
// fflush(stdout);
}
printf("\ndiscard: %d \n\n", discard);
// }
// printf("\ndiscard: %d \n\n", discard);
// #ifdef GET_IMAGE_DEBUG
if (debug_camera)

Loading…
Cancel
Save

Powered by TurnKey Linux.