clean up filesystem goo, add spiffs to install scripts, fix #496

@mc-hamster seems to work pretty good for me, so I'll send a PR to you
for the dev-http branch.

I'll push out an android alpha build later today (once the build is
complete).  Once this new device load is out in the field _future_
device builds will support updating spiffs from android. (i.e. device
loads older than 1.1.9 must be updated to 1.1.9 or later before spiffs
support is implemented on the device side - so some users might need to
update twice before the new spiffs contents will appear on their device)
This commit is contained in:
Kevin Hester
2020-11-19 09:25:02 +08:00
parent df75cefeeb
commit d7d13d637c
6 changed files with 68 additions and 37 deletions

View File

@@ -11,6 +11,7 @@
// #include "rom/rtc.h"
#include "DSRRouter.h"
// #include "debug.h"
#include "FSCommon.h"
#include "RTC.h"
#include "SPILock.h"
#include "concurrency/OSThread.h"
@@ -173,7 +174,7 @@ class ButtonThread : public OSThread
#ifdef BUTTON_PIN
userButton = OneButton(BUTTON_PIN, true, true);
#ifdef INPUT_PULLUP_SENSE
// Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did
// Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did
pinMode(BUTTON_PIN, INPUT_PULLUP_SENSE);
#endif
userButton.attachClick(userButtonPressed);
@@ -184,9 +185,9 @@ class ButtonThread : public OSThread
#ifdef BUTTON_PIN_ALT
userButtonAlt = OneButton(BUTTON_PIN_ALT, true, true);
#ifdef INPUT_PULLUP_SENSE
// Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did
// Some platforms (nrf52) have a SENSE variant which allows wake from sleep - override what OneButton did
pinMode(BUTTON_PIN_ALT, INPUT_PULLUP_SENSE);
#endif
#endif
userButtonAlt.attachClick(userButtonPressed);
userButtonAlt.attachDuringLongPress(userButtonPressedLong);
userButtonAlt.attachDoubleClick(userButtonDoublePressed);
@@ -209,7 +210,7 @@ class ButtonThread : public OSThread
canSleep &= userButtonAlt.isIdle();
#endif
// if (!canSleep) DEBUG_MSG("Supressing sleep!\n");
//else DEBUG_MSG("sleep ok\n");
// else DEBUG_MSG("sleep ok\n");
return 5;
}
@@ -225,13 +226,13 @@ class ButtonThread : public OSThread
DEBUG_MSG("Long press!\n");
screen->adjustBrightness();
}
static void userButtonDoublePressed()
{
{
#ifndef NO_ESP32
disablePin();
disablePin();
#endif
}
}
};
static Periodic *ledPeriodic;
@@ -266,6 +267,8 @@ void setup()
ledPeriodic = new Periodic("Blink", ledBlinker);
fsInit();
router = new DSRRouter();
#ifdef I2C_SDA