From a27286bc9706556880418dfab5ad74cba408b298 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Mon, 15 Aug 2022 05:28:05 -0400 Subject: [PATCH] added jpeg_decode and scottie1_transmit_file with PTT --- cubesatsim/cubesatsim.ino | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/cubesatsim/cubesatsim.ino b/cubesatsim/cubesatsim.ino index 21d2d9e7..f42e7c52 100644 --- a/cubesatsim/cubesatsim.ino +++ b/cubesatsim/cubesatsim.ino @@ -182,7 +182,8 @@ void loop() { strcpy(image_file, sstv1_filename); first_time_sstv = false; } else { -// get jpeg from camera + + // get jpeg from camera in future @@ -192,7 +193,20 @@ void loop() { Serial.print("\nSending SSTV image "); print_string(image_file); // send_sstv("/cam.raw"); - send_sstv(image_file); + +// send_sstv(image_file); + + char output_file[] = "/cam.bin"; + jpeg_decode(input_file, output_file); + + Serial.println("Start transmit!"); + digitalWrite(PTT_PIN, LOW); // start transmit + + scottie1_transmit_file(output_file); + + Serial.println("Stop transmit!"); + digitalWrite(PTT_PIN, HIGH); // stop transmit + Serial.println("\nImage sent!"); } else