diff --git a/cubesatsim/esp32-cam/esp32-cam.ino b/cubesatsim/esp32-cam/esp32-cam.ino index 138ceb51..52afb54c 100644 --- a/cubesatsim/esp32-cam/esp32-cam.ino +++ b/cubesatsim/esp32-cam/esp32-cam.ino @@ -306,6 +306,7 @@ void load_files() { } else { Serial.println("Loading image sstv_image_1_320_x_240.jpg into FS"); f = SPIFFS.open("/sstv_image_1_320_x_240.jpg", FILE_WRITE); + if (!f) Serial.println("Error opening"); 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."); delay(2000); @@ -320,6 +321,7 @@ void load_files() { } else { Serial.println("Loading image sstv_image_2_320_x_240.jpg into FS"); f = SPIFFS.open("/sstv_image_2_320_x_240.jpg", FILE_WRITE); + if (!f) Serial.println("Error opening"); 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"); delay(2000);