Merge pull request #351 from fdlamotte/stm32_sensors

wio_e5 : bme280 support
This commit is contained in:
ripplebiz 2025-06-01 16:38:25 +10:00 committed by GitHub
commit 057b0f6a25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 46 additions and 11 deletions

View file

@ -126,11 +126,14 @@ InternalFileSystem::InternalFileSystem(void)
bool InternalFileSystem::begin(void)
{
volatile bool format_fs;
#ifdef FORMAT_FS
this->format();
format_fs = true;
#else
format_fs = false; // you can always use debugger to force formatting ;)
#endif
// failed to mount, erase all sector then format and mount again
if ( !Adafruit_LittleFS::begin() )
if ( format_fs || !Adafruit_LittleFS::begin() )
{
// lfs format
this->format();