@@ -265,36 +265,36 @@ void loop() {
265
265
// char output_file2[] = "/cam2.bin";
266
266
char output_file[] = " /cam.bin" ;
267
267
// jpeg_decode(image_file, output_file, true); // debug_mode);
268
- jpeg_decode (input_file, output_file, false ); // debug_mode);
269
- show_dir ();
270
- // char telem_display[] = " BATT: STATUS: TEMP: ";
271
-
272
- digitalWrite (PTT_PIN, HIGH); // shouldn't need this but
273
- // rotate_image(output_file2, output_file, telem_display);
274
- // show_dir();
275
-
276
- if (debug_mode)
277
- Serial.println (" Start transmit!!!" );
278
- digitalWrite (PTT_PIN, LOW); // start transmit
279
- transmit_led (HIGH);
280
-
281
- picosstvpp ();
282
-
283
- // scottie1_transmit_file(output_file, debug_mode);
284
-
285
- // ITimer1.stopTimer(); // turn off pushbutton timer
286
- // / ITimer1.disableTimer(); // turn off pushbutton timer
287
- // play_pwm_file(26);
288
- // ITimer1.restartTimer(); // turn back on pushbutton timer
289
- // / ITimer1.enableTimer(); // turn back on pushbutton timer
290
- if (debug_mode)
291
- Serial.println (" Stop transmit!" );
292
- digitalWrite (PTT_PIN, HIGH); // stop transmit
293
- transmit_led (LOW);
294
-
295
- if (debug_mode)
296
- Serial.println (" \n Image sent!" );
297
-
268
+ if ( jpeg_decode (input_file, output_file, false )) { // only transmit if jpeg decode successful
269
+ show_dir ();
270
+ // char telem_display[] = " BATT: STATUS: TEMP: ";
271
+
272
+ digitalWrite (PTT_PIN, HIGH); // shouldn't need this but
273
+ // rotate_image(output_file2, output_file, telem_display);
274
+ // show_dir();
275
+
276
+ if (debug_mode)
277
+ Serial.println (" Start transmit!!!" );
278
+ digitalWrite (PTT_PIN, LOW); // start transmit
279
+ transmit_led (HIGH);
280
+
281
+ picosstvpp ();
282
+
283
+ // scottie1_transmit_file(output_file, debug_mode);
284
+
285
+ // ITimer1.stopTimer(); // turn off pushbutton timer
286
+ // / ITimer1.disableTimer(); // turn off pushbutton timer
287
+ // play_pwm_file(26);
288
+ // ITimer1.restartTimer(); // turn back on pushbutton timer
289
+ // / ITimer1.enableTimer(); // turn back on pushbutton timer
290
+ if (debug_mode)
291
+ Serial.println (" Stop transmit!" );
292
+ digitalWrite (PTT_PIN, HIGH); // stop transmit
293
+ transmit_led (LOW);
294
+
295
+ if (debug_mode)
296
+ Serial.println (" \n Image sent!" );
297
+ }
298
298
}
299
299
else
300
300
Serial.println (" Unknown mode!" );
0 commit comments