M5Stack SD Updater Versions Save

💾 Customizable menu system for M5Stack and ESP32-Chimera-Core - loads apps from the Micro SD card. Easily add you own apps

v1.1.4

2 years ago

Lobby screen redesign

Apologies for the colour choices, if it can be of any consolation, some elements of the lobby design can be customized and I'll be happy to integrate a better theme if a contribution shows up.

Customizing the colours is possible by overwriting some object propertis, see DefaultBtnStyle, SplashTitleStyle, SplashAppNameStyle, SplashAppPathStyle and ProgressStyle in M5StackUpdaterUI.h.

If a non-zero wait delay is provided as third argument to checkSDUpdater, the lobby screen is visible at every boot and runs a countdown until that delay is expired:

  // Setting `5000` is strongly recommended with touch screens.
  checkSDUpdater(
    SD,           
    MENU_BIN,     
    5000,         // <-- wait delay, (milliseconds, default=0)
    TFCARD_CS_PIN 
  );

During the countdown. the user can choose between three options:

  1. Loading the launcher (/menu.bin)
  2. Skipping the countdown and run the application
  3. Saving the sketch to the filesystem and run the application (see next topic "Binary persistence")

New config setters

  SDUCfg.setLabelSave( const char* label );  // change the label on the "Save" button
  SDUCfg.setAppName( const char* name );     // set the application name (displayed in the lobby)
  SDUCfg.setBinFileName( const char* path ); // set the application binary path (used by saveSketchToFS)

Binary persistence

saveSketchToFS is now implicit if a binary path is associated to the running sketch and the file does not exist on the SD Card

  SDUCfg.setAppName( "My Application" );         // Lobby screen label: application name
  SDUCfg.setBinFileName( "/MyApplication.bin" ); // If file path to bin is set for this app, it will be checked at boot and created if not exist

When set, the existence of the binary file will be checked on boot.

Whether the binary file exists or not, an extra Save button associated to BtnC will be shown in the lobby. Using the Save button will manually create or overwrite the binary at the path specified by SDUCfg.setBinFileName. This can be handy during development as well as for backuping both the menu.bin and the running app.


M5Unified compliance (see new example)

While the library is still under development, it may need some quirks to work outside M5Stack scope such as manually defining TFCARD_CS_PIN (default=4) before #include <M5StackUpdater.h>.


M5StickC

  • Added Macros for handling the lack of setFont() method in the M5StickC.h library and no BtnC implementation
  • Evaluating upcoming deprecation: the support for M5StickC.h will soon be dropped and replaced by M5Unified.h

M5Core2

  • M5Core2 / classic / AWS / tough are also embracing LFGX family drivers.
  • Evaluating upcoming deprecation: the support for M5Core2.h will soon be dropped and replaced by M5Unified.h

Github workflow

  • Sketches are now built on push/pull-request/release using github action
  • SD-Menu binaries are now added to release assets using a github workflow triggered on release publish

v1.1.3

2 years ago

Added SDUCfg.setLabelMenu( const char* ) and SDUCfg.setLabelSkip( const char* ) to the config loader, to let the user customize the text in the action buttons visible in the lobby.

It must be called before checkSDUpdater().

An few extra macros have been added, see gitTagVersion.h

    #if defined M5_SD_UPDATER_VERSION_INT
      SDUCfg.setLabelMenu("<< Menu");
      SDUCfg.setLabelSkip("Launch");
    #endif

v1.1.2

2 years ago

Restored a macro based on esp-idf version rather than using the new ESP_ARDUINO_VERSION_VAL() macro which gives errors with older core versions.

See #156, thanks to @fermintm for reporting.

1.1.0

2 years ago

Support added for:

  • ESP32 Arduino Core 2.0
  • LovyanGFX/M5GFX shared syntax
  • LittleFS/PSRamFS
  • SDUpdater configuration
  • Fixed M5StikC

New Features:

  • saveSketchToFS(): copy sketch from flash to filesystem
  • #define SDU_APP_NAME to customize lobby screen
  • #define SDU_HEADLESS to use serial as action source for update
  • Early callback setters:
  SDUCfg.setProgressCb  ( myProgress );         // void (*onProgress)( int state, int size )
  SDUCfg.setMessageCb   ( myDrawMsg );          // void (*onMessage)( const String& label )
  SDUCfg.setErrorCb     ( myErrorMsg );         // void (*onError)( const String& message, unsigned long delay )
  SDUCfg.setBeforeCb    ( myBeforeCb );         // void (*onBefore)()
  SDUCfg.setAfterCb     ( myAfterCb );          // void (*onAfter)()
  SDUCfg.setSplashPageCb( myDrawSplashPage );   // void (*onSplashPage)( const char* msg )
  SDUCfg.setButtonDrawCb( myDrawPushButton );   // void (*onButtonDraw)( const char* label, uint8_t position, uint16_t outlinecolor, uint16_t fillcolor, uint16_t textcolor )
  SDUCfg.setWaitForActionCb( myActionTrigger ); // int  (*onWaitForAction)( char* labelLoad, char* labelSkip, unsigned long waitdelay )

Breaking changes:

  • checkSDUpdater()'s first argument (fs::FS) is now mandatory
  • Filesystem libraries must be #included prior to M5StackUpdater.h

Examples:

  • Headless: demo with no buttons and display, uses serial
  • CopySketchToFS: demo for the new saveSketchToFS() feature
  • M5Stack-SD-Menu: disabled downloader on non-psram builds

1.0.3

3 years ago

added library.json fix for platformio

1.0.2

3 years ago

compilation fix & code improvement

1.0.1-beta

3 years ago
  • M5Core2 + ESP32-Chimera-Core have a fancier Touch UI
  • Updated example sketch
  • Fixed a few bugs, but still beta quality

1.0.0-alpha

3 years ago
  • Addded headless mode
  • Removed every #include for any external M5Stack/M5Stick/M5Core2/ESP32-Chimera-Core library
  • Added M5Core2 support (with button emulation using Touch)
  • Updated examples

0.5.2

4 years ago
  • Removed 'textFont' mentions for LGFX compliance (beta-test URL)
  • Added @matsumo's m5stickc_tiny_menu

0.5.1

4 years ago