From 6ae4bdb8e8589a5bfd1d92ddc058b6eae9cb71a4 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Tue, 21 Feb 2023 22:19:44 -0500 Subject: [PATCH] only print info if debug mode. --- cubesatsim/pico-get-jpeg-serial.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cubesatsim/pico-get-jpeg-serial.cpp b/cubesatsim/pico-get-jpeg-serial.cpp index 2bafbdf6..5d0a8716 100644 --- a/cubesatsim/pico-get-jpeg-serial.cpp +++ b/cubesatsim/pico-get-jpeg-serial.cpp @@ -181,7 +181,7 @@ bool get_camera_image(bool debug_camera) { // #ifdef GET_IMAGE_DEBUG if (debug_camera) - Serial.println("Received from ESP32-CAM hex encoded:\n"); + Serial.println("Received from ESP32-CAM (hex encoded part is JPG image):\n"); // #endif finished = false; @@ -190,7 +190,7 @@ bool get_camera_image(bool debug_camera) { if (Serial2.available()) { // If anything comes in Serial2 byte octet = Serial2.read(); - if (!start_flag_detected) + if ((!start_flag_detected) && (debug_camera)) Serial.write(octet); if (start_flag_complete) {