From 81ec94966ee6b9131ff48d1d61824ad63a8844d5 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Fri, 27 Jan 2023 22:03:48 -0500 Subject: [PATCH] more debug prints --- cubesatsim/pico-get-jpeg-serial.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cubesatsim/pico-get-jpeg-serial.cpp b/cubesatsim/pico-get-jpeg-serial.cpp index 96f8c335..9467e46c 100644 --- a/cubesatsim/pico-get-jpeg-serial.cpp +++ b/cubesatsim/pico-get-jpeg-serial.cpp @@ -196,9 +196,10 @@ bool get_camera_image(bool debug_camera) { if (octet == end_flag[flag_count]) { // looking for end flag // if (end_flag_detected) { flag_count++; -#ifdef GET_IMAGE_DEBUG +//#ifdef GET_IMAGE_DEBUG + if (debug_camera) Serial.println("Found part of end flag!"); -#endif +//#endif if (flag_count >= strlen(end_flag)) { // complete image /// buffer2[index1++] = octet; // Serial.println("\nFound end flag"); @@ -247,7 +248,8 @@ bool get_camera_image(bool debug_camera) { } /// buffer2[index1++] = octet; -#ifdef GET_IMAGE_DEBUG +//#ifdef GET_IMAGE_DEBUG + if (debug_camera) { char hexValue[5]; if (octet != 0x66) { sprintf(hexValue, "%02X", octet); @@ -257,7 +259,8 @@ bool get_camera_image(bool debug_camera) { Serial.print("66"); } // Serial.write(octet); -#endif + } +//#endif if (index1 > 100000) index1 = 0; // }