From 7dc51d1274ea7d4e51990a35df5d5895723b4994 Mon Sep 17 00:00:00 2001 From: MartinMueller2003 Date: Tue, 26 Mar 2024 16:04:55 -0400 Subject: [PATCH] Fixes to the startup sequence to fix file system errors. --- pio_examples/gui/src/gui.ino | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pio_examples/gui/src/gui.ino b/pio_examples/gui/src/gui.ino index 18fcc1d..bb9aadc 100644 --- a/pio_examples/gui/src/gui.ino +++ b/pio_examples/gui/src/gui.ino @@ -287,18 +287,18 @@ void setup(void) */ ESPUI.sliderContinuous = true; -#ifdef TEST_FILEDISPLAY ESPUI.prepareFileSystem(); - // create a text file - ESPUI.writeFile("/DisplayFile.txt", "Test Line\n"); + ESPUI.beginLITTLEFS("ESPUI Control"); // these files are used by browsers to auto config a connection. ESPUI.writeFile("/wpad.dat", " "); ESPUI.writeFile("/connecttest.txt", " "); -#endif // def TEST_FILEDISPLAY - ESPUI.beginLITTLEFS("ESPUI Control"); +#ifdef TEST_FILEDISPLAY + // create a text file + ESPUI.writeFile("/DisplayFile.txt", "Test Line\n"); +#endif // def TEST_FILEDISPLAY } void loop(void)