|
|
|
|
@ -40,6 +40,10 @@
|
|
|
|
|
#include "hardware/adc.h"
|
|
|
|
|
#include "SSTV-Arduino-Scottie1-Library.h"
|
|
|
|
|
|
|
|
|
|
// jpg files to be stored in flash storage on Pico (FS 1MB setting)
|
|
|
|
|
#include sstv1.h
|
|
|
|
|
#include sstv2.h
|
|
|
|
|
|
|
|
|
|
Adafruit_INA219 ina219_1_0x40;
|
|
|
|
|
Adafruit_INA219 ina219_1_0x41(0x41);
|
|
|
|
|
Adafruit_INA219 ina219_1_0x44(0x44);
|
|
|
|
|
@ -119,6 +123,8 @@ void setup() {
|
|
|
|
|
|
|
|
|
|
// setup radio depending on mode
|
|
|
|
|
config_radio();
|
|
|
|
|
|
|
|
|
|
load_files();
|
|
|
|
|
/*
|
|
|
|
|
if (check_for_wifi()) {
|
|
|
|
|
wifi = true;
|
|
|
|
|
@ -3506,3 +3512,43 @@ void parse_payload() {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void show_dir() {
|
|
|
|
|
LittleFS.begin();
|
|
|
|
|
Dir dir = LittleFS.openDir("/");
|
|
|
|
|
// or Dir dir = LittleFS.openDir("/data");
|
|
|
|
|
Serial.println(">");
|
|
|
|
|
while (dir.next()) {
|
|
|
|
|
Serial.print(dir.fileName());
|
|
|
|
|
if(dir.fileSize()) {
|
|
|
|
|
File f = dir.openFile("r");
|
|
|
|
|
Serial.print(" ");
|
|
|
|
|
Serial.println(f.size());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Serial.println(">");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void load_files() {
|
|
|
|
|
LittleFS.begin();
|
|
|
|
|
File f;
|
|
|
|
|
|
|
|
|
|
f = LittleFS.open("sstv_image_1_320_x_240.jpg", "r");
|
|
|
|
|
Serial.print("Image sstv_image_1_320_x_240.jpg: ");
|
|
|
|
|
Serial.println(f);
|
|
|
|
|
f.close();
|
|
|
|
|
|
|
|
|
|
f = LittleFS.open("sstv_image_2_320_x_240.jpg", "r");
|
|
|
|
|
Serial.print("Image sstv_image_2_320_x_240.jpg: ");
|
|
|
|
|
Serial.println(f);
|
|
|
|
|
f.close();
|
|
|
|
|
|
|
|
|
|
f = LittleFS.open("sstv_image_1_320_x_240.jpg", "w+");
|
|
|
|
|
f.write(sstv_image_1_320_x_240, sizeof(sstv_image_1_320_x_240));
|
|
|
|
|
f.close();
|
|
|
|
|
|
|
|
|
|
f = LittleFS.open("sstv_image_2_320_x_240.jpg", "w+");
|
|
|
|
|
f.write(sstv_image_2_320_x_240, sizeof(sstv_image_2_320_x_240));
|
|
|
|
|
f.close();
|
|
|
|
|
|
|
|
|
|
show_dir()}
|
|
|
|
|
|