diff --git a/RX_FSK/RX_FSK.ino b/RX_FSK/RX_FSK.ino
index ad00d53..31c39bd 100644
--- a/RX_FSK/RX_FSK.ino
+++ b/RX_FSK/RX_FSK.ino
@@ -372,7 +372,7 @@ struct st_configitems config_list[] = {
{"debug", "Debug mode (0/1)", 0, &sonde.config.debug},
{"maxsonde", "Maxsonde (requires reboot?)", 0, &sonde.config.maxsonde},
{"display", "Display mode (1/2/3)", 0, &sonde.config.display},
- {"---", "---", -1, NULL},
+ {"---", "---", -1, NULL},
/* Spectrum display settings */
{"spectrum", "ShowSpectrum (s)", 0, &sonde.config.spectrum},
{"startfreq", "Startfreq (MHz)", 0, &sonde.config.startfreq},
@@ -403,7 +403,7 @@ struct st_configitems config_list[] = {
{"---", "---", -1, NULL},
/* RS41 decoder settings */
{"rs41.agcbw", "RS41 AGC bandwidth", 0, &sonde.config.rs41.agcbw},
- {"rs41.rxbw", "RS41 RX bandwidth", 0, &sonde.config.rs41.rxbw},
+ {"rs41.rxbw", "RS41 RX bandwidth", 0, &sonde.config.rs41.rxbw},
{"---", "---", -1, NULL},
/* Hardware dependeing settings */
{"oled_sda", "OLED SDA (needs reboot)", 0, &sonde.config.oled_sda},
@@ -495,13 +495,13 @@ const char *handleConfigPost(AsyncWebServerRequest *request) {
setupConfigData();
}
-const char *ctrlid[]={"rx","scan","spec","wifi"};
-const char *ctrllabel[]={"Receiver (short keypress)", "Scanner (double keypress)", "Spectrum (medium keypress)", "WiFi (long keypress)"};
+const char *ctrlid[] = {"rx", "scan", "spec", "wifi"};
+const char *ctrllabel[] = {"Receiver (short keypress)", "Scanner (double keypress)", "Spectrum (medium keypress)", "WiFi (long keypress)"};
const char *createControlForm() {
char *ptr = message;
char tmp[4];
strcpy(ptr, "
");
+ return message;
+}
+
+
+const char *handleEditPost(AsyncWebServerRequest *request) {
+ Serial.println("Handling post request");
+ AsyncWebParameter *filep = request->getParam("file");
+ if(!filep) return NULL;
+ String filename = filep->value();
+ AsyncWebParameter *textp = request->getParam("text", true);
+ if(!textp) return NULL;
+ String content = textp->value();
+ File file = SPIFFS.open("/" + filename, "w");
+ if (!file) {
+ Serial.println("There was an error opening the file '/" + filename + "'for writing");
+ return "";
+ }
+ file.print(content);
+ file.close();
+ return "";
+}
+
const char *createUpdateForm(boolean run) {
char *ptr = message;
char tmp[4];
strcpy(ptr, "