From 04209589a19339aa278ef199f70121bea76a3fb4 Mon Sep 17 00:00:00 2001 From: fvanroie Date: Sat, 1 Feb 2020 20:03:37 +0100 Subject: [PATCH] Format FS if needed --- src/hasp_spiffs.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/hasp_spiffs.cpp b/src/hasp_spiffs.cpp index 56b5bb1c..8f0f6ebc 100644 --- a/src/hasp_spiffs.cpp +++ b/src/hasp_spiffs.cpp @@ -42,7 +42,11 @@ void spiffsSetup() #if LV_USE_HASP_SPIFFS char msg[64]; +#if defined(ARDUINO_ARCH_ESP8266) + if(!SPIFFS.begin()) { +#else if(!SPIFFS.begin(true)) { +#endif sprintf(msg, PSTR("FILE: %sSPI flash init failed. Unable to mount FS.")); errorPrintln(msg); } else {