Closed sadatusa closed 2 years ago
The conf.deleteConfig() function returns true, but it does not delete the configuration. I don't get the error, though. I'm using IDE 1.8.19, the latest version of ArduinoJson, and ESP32.
This is an error in the code. In lines 469 to 471 in WebConfig.cpp should be
//delete configuration file boolean WebConfig::deleteConfig(const char * filename){ return SPIFFS.remove(filename); }
I forgot the SPIFFS in front of remove. I will create a new release where this error will be fixed.
Works fine now. Thanks! I am finding that a delay must be added after deleteConfig(), or values can still be read, if read quickly enough.
Add conf.deleteConfig() after WiFi.mode(), in the example, to demonstrate this behavior.
Hi Dear, Nice lib... I tried to use conf.deleteConfig(); but receive following error in the example...
boolean x = conf.deleteConfig();
_Arduino: 1.8.15 (Windows 7), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
c:/users/sadathussain/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: c:/users/sadathussain/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-remove.o):(.literal+0x0): undefined reference to `_unlink_r'
c:/users/sadathussain/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/bin/ld.exe: c:/users/sadathussain/appdata/local/arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/3.0.3-gcc10.3-9bcba0b/bin/../lib/gcc/xtensa-lx106-elf/10.3.0/../../../../xtensa-lx106-elf/lib\libc.a(lib_a-remove.o): in function
_remove_r': /workdir/repo/newlib/newlib/libc/stdio/remove.c:65: undefined reference to
_unlinkr' collect2.exe: error: ld returned 1 exit status exit status 1 Error compiling for board NodeMCU 1.0 (ESP-12E Module).