From da09f8117662fafb764f72300ae7a888d185c8f1 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 14:49:26 -0500 Subject: [PATCH 01/18] add one second delay --- cubesatsim/cubesatsim.ino | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 2adfe459..b5a2a40a 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -78,7 +78,9 @@ void setup() { // set_sys_clock_khz(133000, true); - Serial.begin(115200); + Serial.begin(115200); + + delay(1000); LittleFS.begin(); // LittleFS.format(); // only format if files of size 0 keep showing up @@ -90,13 +92,13 @@ void setup() { new_mode = mode; pinMode(LED_BUILTIN, OUTPUT); - blinkTimes(1); +// blinkTimes(1); /// sleep(5.0); // otherwise, run CubeSatSim Pico code - Serial.println("CubeSatSim Pico v0.33 starting...\n"); +// Serial.println("CubeSatSim Pico v0.33 starting...\n"); config_gpio(); @@ -128,6 +130,8 @@ void setup() { // pinMode(PI_3V3_PIN, OUTPUT); // digitalWrite(PI_3V3_PIN, HIGH); + + Serial.println("CubeSatSim Pico v0.33 starting...\n"); start_payload(); // above code not working, so forcing it From 92e051eb5dc0f4dd31d753e2ca1c5fc9820cf756 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 14:58:12 -0500 Subject: [PATCH 02/18] added sleep after reboot --- cubesatsim/cubesatsim.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index b5a2a40a..0f3cd462 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -348,6 +348,8 @@ void loop() { */ watchdog_reboot (0, SRAM_END, 10); // restart Pico + sleep(20.0); + if (new_mode != CW) transmit_callsign(callsign); sleep(0.5); @@ -4317,7 +4319,9 @@ void prompt_for_input() { case PROMPT_FORMAT: LittleFS.format(); Serial.println("Reboot or power cycle to restart the CubeSatSim"); - while (1) ; // infinite loop + // while (1) ; // infinite loop + watchdog_reboot (0, SRAM_END, 10); // restart Pico + sleep(20.0); break; case PROMPT_PAYLOAD: From c859200a0e8586cbe7f327dc4cf2b617268025ff Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:10:28 -0500 Subject: [PATCH 03/18] added support for reboot PB and BOOTSEL and printing "Reboot" and move v0.33 --- cubesatsim/cubesatsim.ino | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 0f3cd462..b71fda7b 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -98,7 +98,7 @@ void setup() { // otherwise, run CubeSatSim Pico code -// Serial.println("CubeSatSim Pico v0.33 starting...\n"); + Serial.println("CubeSatSim Pico v0.33 starting...\n"); config_gpio(); @@ -131,7 +131,7 @@ void setup() { // pinMode(PI_3V3_PIN, OUTPUT); // digitalWrite(PI_3V3_PIN, HIGH); - Serial.println("CubeSatSim Pico v0.33 starting...\n"); +// Serial.println("CubeSatSim Pico v0.33 starting...\n"); start_payload(); // above code not working, so forcing it @@ -346,6 +346,7 @@ void loop() { config_done = true; } */ + Serial.println("Rebooting..."); watchdog_reboot (0, SRAM_END, 10); // restart Pico sleep(20.0); @@ -3337,6 +3338,9 @@ void process_pushbutton() { if (pb_value == RELEASED) { Serial.println("PB: Reboot!"); release = TRUE; + + Serial.println("Rebooting..."); + watchdog_reboot (0, SRAM_END, 10); // restart Pico } blinkTimes(1); @@ -3436,6 +3440,9 @@ void process_bootsel() { if (!BOOTSEL) { Serial.println("BOOTSEL: Reboot!"); release = TRUE; + + Serial.println("Rebooting..."); + watchdog_reboot (0, SRAM_END, 10); // restart Pico } blinkTimes(1); @@ -4318,9 +4325,10 @@ void prompt_for_input() { case PROMPT_FORMAT: LittleFS.format(); - Serial.println("Reboot or power cycle to restart the CubeSatSim"); +// Serial.println("Reboot or power cycle to restart the CubeSatSim"); // while (1) ; // infinite loop - watchdog_reboot (0, SRAM_END, 10); // restart Pico + Serial.println("Rebooting..."); + watchdog_reboot (0, SRAM_END, 10); // restart Pico sleep(20.0); break; From d8814c0439132dc42254e686c8812a7257833cda Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:14:30 -0500 Subject: [PATCH 04/18] added PROMPT_REBOOT --- cubesatsim/cubesatsim.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cubesatsim/cubesatsim.h b/cubesatsim/cubesatsim.h index cbca9c76..dfb00def 100644 --- a/cubesatsim/cubesatsim.h +++ b/cubesatsim/cubesatsim.h @@ -127,6 +127,7 @@ #define PROMPT_PAYLOAD 10 #define PROMPT_TEMP 11 #define PROMPT_FORMAT 12 +#define PROMPT_REBOOT 13 #define PAYLOAD_QUERY 1 #define PAYLOAD_RESET 2 From 99fd7566607e14607527445a8a43a46cd377eda5 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:17:24 -0500 Subject: [PATCH 05/18] changed prompt reboot --- cubesatsim/cubesatsim.ino | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index b71fda7b..4d1bf5c5 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -3338,9 +3338,7 @@ void process_pushbutton() { if (pb_value == RELEASED) { Serial.println("PB: Reboot!"); release = TRUE; - - Serial.println("Rebooting..."); - watchdog_reboot (0, SRAM_END, 10); // restart Pico + prompt = PROMPT_REBOOT; } blinkTimes(1); @@ -3440,9 +3438,7 @@ void process_bootsel() { if (!BOOTSEL) { Serial.println("BOOTSEL: Reboot!"); release = TRUE; - - Serial.println("Rebooting..."); - watchdog_reboot (0, SRAM_END, 10); // restart Pico + prompt = PROMPT_REBOOT; } blinkTimes(1); @@ -4323,6 +4319,12 @@ void prompt_for_input() { read_ina219(); break; + case PROMPT_REBOOT: + Serial.println("Rebooting..."); + watchdog_reboot (0, SRAM_END, 10); // restart Pico + sleep(20.0); + break; + case PROMPT_FORMAT: LittleFS.format(); // Serial.println("Reboot or power cycle to restart the CubeSatSim"); From 4526b314c5ada4d9d867db5c9efb145550b58f3b Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:23:23 -0500 Subject: [PATCH 06/18] delay 2000 at start --- cubesatsim/cubesatsim.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 4d1bf5c5..ba47fc3f 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -80,7 +80,7 @@ void setup() { Serial.begin(115200); - delay(1000); + delay(2000); LittleFS.begin(); // LittleFS.format(); // only format if files of size 0 keep showing up @@ -3413,7 +3413,8 @@ void process_pushbutton() { digitalWrite(MAIN_LED_GREEN, LOW); sleep(0.5); digitalWrite(MAIN_LED_GREEN, HIGH); - sleep(0.5); + sleep(0.5); + sleep_ms(0xffffff); } if (new_mode != mode) @@ -3514,7 +3515,7 @@ void process_bootsel() { sleep(0.5); digitalWrite(MAIN_LED_GREEN, HIGH); sleep(0.5); - + sleep_ms(0xffffff); } if (new_mode != mode) transmit_off(); From 77653fa2af2f581dd1ba26fa9cf30bf179fc02bf Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:47:21 -0500 Subject: [PATCH 07/18] add sleep dormant --- cubesatsim/cubesatsim.ino | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index ba47fc3f..d33aa460 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -45,6 +45,7 @@ #include "picosstvpp.h" #include "pico/bootrom.h" #include "hardware/watchdog.h" +#include "pico/sleep.h" // jpg files to be stored in flash storage on Pico (FS 512kB setting) //#include "sstv1.h" @@ -3414,7 +3415,7 @@ void process_pushbutton() { sleep(0.5); digitalWrite(MAIN_LED_GREEN, HIGH); sleep(0.5); - sleep_ms(0xffffff); + sleep_goto_dormant_until_pin(14, true, true); } if (new_mode != mode) @@ -3515,7 +3516,7 @@ void process_bootsel() { sleep(0.5); digitalWrite(MAIN_LED_GREEN, HIGH); sleep(0.5); - sleep_ms(0xffffff); + sleep_goto_dormant_until_pin(14, true, true); } if (new_mode != mode) transmit_off(); From e5bdabb6c53aa36a68523af622a8982018548534 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:48:35 -0500 Subject: [PATCH 08/18] Update cubesatsim.ino --- cubesatsim/cubesatsim.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index d33aa460..c9193152 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -45,7 +45,7 @@ #include "picosstvpp.h" #include "pico/bootrom.h" #include "hardware/watchdog.h" -#include "pico/sleep.h" +#include "pico_sleep/sleep.h" // jpg files to be stored in flash storage on Pico (FS 512kB setting) //#include "sstv1.h" From 79d6f2c78a33bc7ab6a0a7bddee4aa95737e0b1f Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:52:29 -0500 Subject: [PATCH 09/18] Update cubesatsim.ino --- cubesatsim/cubesatsim.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index c9193152..d14a8047 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -45,7 +45,8 @@ #include "picosstvpp.h" #include "pico/bootrom.h" #include "hardware/watchdog.h" -#include "pico_sleep/sleep.h" +#include "pico/stdlib.h" +#include "pico/sleep.h" // jpg files to be stored in flash storage on Pico (FS 512kB setting) //#include "sstv1.h" From 6c319506c9c9785eb00cd45497711a8f3c8624c3 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:53:07 -0500 Subject: [PATCH 10/18] Update cubesatsim.ino --- cubesatsim/cubesatsim.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index d14a8047..8b1101b4 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -46,7 +46,7 @@ #include "pico/bootrom.h" #include "hardware/watchdog.h" #include "pico/stdlib.h" -#include "pico/sleep.h" +#include "pico_extras/sleep.h" // jpg files to be stored in flash storage on Pico (FS 512kB setting) //#include "sstv1.h" From 661049872e6dc0c29ebcfb85c80ec36597079f5f Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:54:33 -0500 Subject: [PATCH 11/18] Update cubesatsim.ino --- cubesatsim/cubesatsim.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 8b1101b4..26a6c9d9 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -46,7 +46,7 @@ #include "pico/bootrom.h" #include "hardware/watchdog.h" #include "pico/stdlib.h" -#include "pico_extras/sleep.h" +#include "pico_sleep/sleep.h" // jpg files to be stored in flash storage on Pico (FS 512kB setting) //#include "sstv1.h" From 2a04bb54b343c1c9815ac497683b54893d0e568d Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 15:55:43 -0500 Subject: [PATCH 12/18] removed shutdown --- cubesatsim/cubesatsim.ino | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 26a6c9d9..11fdd5b0 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -45,8 +45,6 @@ #include "picosstvpp.h" #include "pico/bootrom.h" #include "hardware/watchdog.h" -#include "pico/stdlib.h" -#include "pico_sleep/sleep.h" // jpg files to be stored in flash storage on Pico (FS 512kB setting) //#include "sstv1.h" @@ -3416,8 +3414,7 @@ void process_pushbutton() { sleep(0.5); digitalWrite(MAIN_LED_GREEN, HIGH); sleep(0.5); - sleep_goto_dormant_until_pin(14, true, true); - + } if (new_mode != mode) transmit_off(); @@ -3517,8 +3514,7 @@ void process_bootsel() { sleep(0.5); digitalWrite(MAIN_LED_GREEN, HIGH); sleep(0.5); - sleep_goto_dormant_until_pin(14, true, true); - } + } if (new_mode != mode) transmit_off(); // sleep(2.0); From f4b2fb0a6491d9d669597022ca40a93847c8b2cf Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 16:02:57 -0500 Subject: [PATCH 13/18] added void load_sstv_image_1_as_cam_dot_jpg() and 2 --- cubesatsim/cubesatsim.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cubesatsim/cubesatsim.h b/cubesatsim/cubesatsim.h index dfb00def..f3b69de1 100644 --- a/cubesatsim/cubesatsim.h +++ b/cubesatsim/cubesatsim.h @@ -212,6 +212,8 @@ void read_mode(); void write_mode(); void start_clockgen(); bool TimerHandler1(struct repeating_timer *t); +void load_sstv_image_1_as_cam_dot_jpg(); +void load_sstv_image_2_as_cam_dot_jpg(); #ifndef STASSID #define STASSID "Pico" From 3d8b09f29df2a42fa58b992d18b3d071f09a0390 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 16:06:36 -0500 Subject: [PATCH 14/18] added void load_sstv_image_1_as_cam_dot_jpg() --- cubesatsim/cubesatsim.ino | 45 ++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 11fdd5b0..2b6880b5 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -234,25 +234,30 @@ void loop() { if (camera_detected = get_camera_image()) { Serial.println("Getting image file"); // Serial.println("Got image file"); - char camera_file[] = "/cam.jpg"; - strcpy(image_file, camera_file); +// char camera_file[] = "/cam.jpg"; +// strcpy(image_file, camera_file); } else { - strcpy(image_file, sstv1_filename); // 2nd stored image - Serial.println("Using stored image file"); +// strcpy(image_file, sstv1_filename); // 2nd stored image + Serial.println("Using stored image file"); + load_sstv_image_1_as_cam_dot_jpg(); } - } + } +/* if (debug_mode) { Serial.print("\nSending SSTV image "); print_string(image_file); } +*/ // send_sstv("/cam.raw"); // send_sstv(image_file); // LittleFS.remove("/cam.bin"); - show_dir(); - char output_file2[] = "/cam2.bin"; + show_dir(); + char input_file[] = "/cam.jpg"; +// char output_file2[] = "/cam2.bin"; char output_file[] = "/cam.bin"; - jpeg_decode(image_file, output_file, true); // debug_mode); +// jpeg_decode(image_file, output_file, true); // debug_mode); + jpeg_decode(input_file, output_file, true); // debug_mode); show_dir(); // char telem_display[] = " BATT: STATUS: TEMP: "; @@ -4005,6 +4010,26 @@ void show_dir() { Serial.println(">"); } +void load_sstv_image_1_as_cam_dot_jpg() { + Serial.println("Loading image sstv_image_1_320_x_240.jpg into FS"); + f = LittleFS.open("cam.jpg", "w+"); + if (f.write(sstv_image_1_320_x_240, sizeof(sstv_image_1_320_x_240)) < sizeof(sstv_image_1_320_x_240)) { + Serial.println("Loading image failed. Is Flash Size (FS) set to 1MB?"); + delay(2000); + } + f.close(); +} + +void load_sstv_image_2_as_cam_dot_jpg() { + Serial.println("Loading image sstv_image_2_320_x_240.jpg into FS"); + f = LittleFS.open("cam.jpg", "w+"); + if (f.write(sstv_image_2_320_x_240, sizeof(sstv_image_2_320_x_240)) < sizeof(sstv_image_2_320_x_240)) { + Serial.println("Loading image failed. Is Flash Size (FS) set to 1MB?"); + delay(2000); + } + f.close(); +} + void load_files() { LittleFS.begin(); File f; @@ -4018,7 +4043,7 @@ void load_files() { Serial.println("Loading image sstv_image_1_320_x_240.jpg into FS"); f = LittleFS.open("sstv_image_1_320_x_240.jpg", "w+"); if (f.write(sstv_image_1_320_x_240, sizeof(sstv_image_1_320_x_240)) < sizeof(sstv_image_1_320_x_240)) { - Serial.println("Loading image failed. Is Flash Size (FS) set to 512kB?"); + Serial.println("Loading image failed. Is Flash Size (FS) set to 1MB?"); delay(2000); } f.close(); @@ -4032,7 +4057,7 @@ void load_files() { Serial.println("Loading image sstv_image_2_320_x_240.jpg into FS"); f = LittleFS.open("sstv_image_2_320_x_240.jpg", "w+"); if (f.write(sstv_image_2_320_x_240, sizeof(sstv_image_2_320_x_240)) < sizeof(sstv_image_2_320_x_240)) { - Serial.println("Loading image failed. Is Flash Size (FS) set to 512kB?"); + Serial.println("Loading image failed. Is Flash Size (FS) set to 1MB?"); delay(2000); } f.close(); From bef5da729f7112a2169ae17300dc93add1bf025a Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 16:08:11 -0500 Subject: [PATCH 15/18] typos --- cubesatsim/cubesatsim.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 2b6880b5..3a0abe07 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -4010,7 +4010,9 @@ void show_dir() { Serial.println(">"); } -void load_sstv_image_1_as_cam_dot_jpg() { +void load_sstv_image_1_as_cam_dot_jpg() { + LittleFS.begin(); + File f; Serial.println("Loading image sstv_image_1_320_x_240.jpg into FS"); f = LittleFS.open("cam.jpg", "w+"); if (f.write(sstv_image_1_320_x_240, sizeof(sstv_image_1_320_x_240)) < sizeof(sstv_image_1_320_x_240)) { @@ -4021,6 +4023,8 @@ void load_sstv_image_1_as_cam_dot_jpg() { } void load_sstv_image_2_as_cam_dot_jpg() { + LittleFS.begin(); + File f; Serial.println("Loading image sstv_image_2_320_x_240.jpg into FS"); f = LittleFS.open("cam.jpg", "w+"); if (f.write(sstv_image_2_320_x_240, sizeof(sstv_image_2_320_x_240)) < sizeof(sstv_image_2_320_x_240)) { From 83c7db44de3011190ed110b3eded7b2cb0cb83e1 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 16:09:04 -0500 Subject: [PATCH 16/18] added back sstv1.h --- cubesatsim/cubesatsim.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 3a0abe07..7174f044 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -47,7 +47,7 @@ #include "hardware/watchdog.h" // jpg files to be stored in flash storage on Pico (FS 512kB setting) -//#include "sstv1.h" +#include "sstv1.h" #include "sstv2.h" Adafruit_INA219 ina219_1_0x40; From a1f0c4714be9d48a41aaf5b12343df360bcc506f Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 16:09:48 -0500 Subject: [PATCH 17/18] changed back to image_2 --- cubesatsim/sstv2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cubesatsim/sstv2.h b/cubesatsim/sstv2.h index 3a79b3dc..d8e6cb32 100644 --- a/cubesatsim/sstv2.h +++ b/cubesatsim/sstv2.h @@ -23,8 +23,8 @@ */ #include -//const uint8_t sstv_image_2_320_x_240[] PROGMEM = { -const uint8_t sstv_image_1_320_x_240[] PROGMEM = { +const uint8_t sstv_image_2_320_x_240[] PROGMEM = { +//const uint8_t sstv_image_1_320_x_240[] PROGMEM = { 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x8F, 0x00, 0x8F, 0x00, 0x00, 0xFF, 0xE2, 0x10, 0x08, 0x49, 0x43, 0x43, 0x5F, 0x50, 0x52, 0x4F, 0x46, 0x49, 0x4C, 0x45, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0F, 0xF8, 0x61, 0x70, 0x70, 0x6C, 0x02, 0x10, From 054176e712a57060afdc424a8e211f298ba92cae Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 30 Nov 2022 16:14:23 -0500 Subject: [PATCH 18/18] turn back on first time on SSTV --- cubesatsim/cubesatsim.ino | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 7174f044..4d4500b8 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -224,11 +224,13 @@ void loop() { } else if (mode == SSTV) { - first_time_sstv = false; +// first_time_sstv = false; char image_file[128]; if (first_time_sstv) { // if (false) { // turn this off for now - strcpy(image_file, sstv1_filename); +// strcpy(image_file, sstv1_filename); + Serial.println("Using stored image file"); + load_sstv_image_1_as_cam_dot_jpg(); first_time_sstv = false; } else { if (camera_detected = get_camera_image()) { @@ -239,7 +241,7 @@ void loop() { } else { // strcpy(image_file, sstv1_filename); // 2nd stored image Serial.println("Using stored image file"); - load_sstv_image_1_as_cam_dot_jpg(); + load_sstv_image_2_as_cam_dot_jpg(); } } /*