Update main.c flush serial before reading payload data

pull/294/head
Alan Johnston 2 years ago committed by GitHub
parent d93c29b53a
commit 1c916bee0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2142,13 +2142,15 @@ void loop() {
*/
int get_payload_serial(int debug_camera) {
index1 = 0;
flag_count = 0;
start_flag_detected = FALSE;
start_flag_complete = FALSE;
end_flag_detected = FALSE;
jpeg_start = 0;
serialFlush (uart_fd); // flush serial buffer so latest payload is read
// #ifdef GET_IMAGE_DEBUG
if (debug_camera)

Loading…
Cancel
Save

Powered by TurnKey Linux.