From 89ffb3fe7060cfda32d8e8389513a671f7c3e6ce Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Fri, 14 Oct 2022 10:34:42 -0400 Subject: [PATCH] change filenames if stored image --- cubesatsim/cubesatsim.ino | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 3c823af3..5e5c402a 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -236,19 +236,20 @@ void loop() { // send_sstv(image_file); // LittleFS.remove("/cam.bin"); - show_dir(); - char output_file2[] = "/cam2.bin"; - jpeg_decode(image_file, output_file2, true); // debug_mode); - show_dir(); - char telem_display[] = " BATT: STATUS: TEMP: "; + show_dir(); char output_file[] = "/cam.bin"; - digitalWrite(PTT_PIN, HIGH); // shouldn't need this but - if (!stored_image) { + char output_file2[] = "/cam2.bin"; + if (!stored_image) { + jpeg_decode(image_file, output_file2, true); // debug_mode); + show_dir(); + char telem_display[] = " BATT: STATUS: TEMP: "; + digitalWrite(PTT_PIN, HIGH); // shouldn't need this but Serial.println("Rotating image (takes 30 seconds)"); - rotate_image(output_file2, output_file, telem_display); + rotate_image(output_file2, output_file, telem_display); } - show_dir(); - + else + jpeg_decode(image_file, output_file, true); // debug_mode); + show_dir(); if (debug_mode) Serial.println("Start transmit!!!"); digitalWrite(PTT_PIN, LOW); // start transmit