From 45655a9ff31b1d8ac4d12e861f0692f499ac50d9 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 14 Dec 2022 21:09:51 -0500 Subject: [PATCH] added flush --- cubesatsim/pico-get-jpeg-serial.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cubesatsim/pico-get-jpeg-serial.cpp b/cubesatsim/pico-get-jpeg-serial.cpp index 6d3e4433..14f9424c 100644 --- a/cubesatsim/pico-get-jpeg-serial.cpp +++ b/cubesatsim/pico-get-jpeg-serial.cpp @@ -178,7 +178,8 @@ bool get_camera_image() { Serial.println("Starting get_image_file"); #endif finished = false; - Serial2.println(1); + Serial2.println("\r\n"); + Serial2.fflush(); Serial.println("writing to Serial2"); unsigned long time_start = millis(); while ((!finished) && ((millis() - time_start) < CAMERA_TIMEOUT)) { @@ -272,7 +273,8 @@ bool get_camera_image() { // Serial.println("Resetting. Not start flag."); } } - Serial2.println(1); + Serial2.println("\r\n"); + Serial2.fflush(); // Serial.println("writing to Serial2"); } return(finished);