Comments (9)
The buttons are already emulated by the latest M5Core.h code (pull it from the master, it's not yet in a release), only you can't have the "turn on the M5 while pressing the display" so you'll have to use the third argument (waitdelay) of checkSDUpdater() to get this screen visible long enough to receive the touch signal.
void setup() {
M5.begin();
checkSDUpdater( SD, MENU_BIN, 2000 ); // will wait 2 seconds for a push/touch on BtnA
}
Otherwise there's a UI work in progress but not yet enabled with M5Core2.h, only with ESP32-Chimera-Core.
from m5stack-sd-updater.
Thanks! That's usable, but sub-optimal; I really liked the non-intrusive method that was available before, for when the general case is "I just want to start up normally" and the exceptional case is "I want to run the menu program."
I suppose I could just implement my own test in setup()
, and then call updateFromFS()
if it's positive.
from m5stack-sd-updater.
Using a NVS entry that will affect the behaviour of the SD-Updater on next reboot is very clever, thanks!
I'll try to use rtc_get_reset_reason(0)
but I have no idea which one of those is the double reset :
void print_reset_reason(RESET_REASON reason)
{
switch ( reason)
{
case 1 : Serial.println ("POWERON_RESET");break; /**<1, Vbat power on reset*/
case 3 : Serial.println ("SW_RESET");break; /**<3, Software reset digital core*/
case 4 : Serial.println ("OWDT_RESET");break; /**<4, Legacy watch dog reset digital core*/
case 5 : Serial.println ("DEEPSLEEP_RESET");break; /**<5, Deep Sleep reset digital core*/
case 6 : Serial.println ("SDIO_RESET");break; /**<6, Reset by SLC module, reset digital core*/
case 7 : Serial.println ("TG0WDT_SYS_RESET");break; /**<7, Timer Group0 Watch dog reset digital core*/
case 8 : Serial.println ("TG1WDT_SYS_RESET");break; /**<8, Timer Group1 Watch dog reset digital core*/
case 9 : Serial.println ("RTCWDT_SYS_RESET");break; /**<9, RTC Watch dog Reset digital core*/
case 10 : Serial.println ("INTRUSION_RESET");break; /**<10, Instrusion tested to reset CPU*/
case 11 : Serial.println ("TGWDT_CPU_RESET");break; /**<11, Time Group reset CPU*/
case 12 : Serial.println ("SW_CPU_RESET");break; /**<12, Software reset CPU*/
case 13 : Serial.println ("RTCWDT_CPU_RESET");break; /**<13, RTC Watch dog Reset CPU*/
case 14 : Serial.println ("EXT_CPU_RESET");break; /**<14, for APP CPU, reseted by PRO CPU*/
case 15 : Serial.println ("RTCWDT_BROWN_OUT_RESET");break;/**<15, Reset when the vdd voltage is not stable*/
case 16 : Serial.println ("RTCWDT_RTC_RESET");break; /**<16, RTC Watch dog reset digital core and rtc module*/
default : Serial.println ("NO_MEAN");
}
}
RTC and IMU logic should probably be handled by the sketch though.
from m5stack-sd-updater.
Are you still on this ? I've just pushed some code on the "driverless" version where I've implemented some of your suggestions.
Current behaviour with Touch/SD stays non invasive, no SD-Updater UI is visible both on PushButton and Touch versions, however, issueing a ESP.restart() will make it visible on next reboot.
This behaviour can also be bypassed to make the SD-Updater UI visible at all times by forcing a timeout
checkSDUpdater( SD, MENU_BIN, 2000 ); // will wait 2 seconds
The SD Updater class now supports three types of assertions to trigger de sd-loading :
- Serial input (headless support, no HID)
- GPIO button push (M5Stack classic, Odroid-Go)
- Touch button press (M5Core2, TWatch, ESPMarauder)
Moreover, you can overload the class with your own push/touch/sensor/whatever assertion from outside the class.
This should ease the testing of the IMU/RTC options you were suggesting earlier.
Please let me know if you're motivated by this and I'll document it.
from m5stack-sd-updater.
Thanks! I had implemented a test for reset-while-upside-down
and was pretty happy with it, but I will be glad to download and test this out, it may be better. Schedule looks full today but I will get to it by tomorrow.
I'm interested in:
Moreover, you can overload the class with your own push/touch/sensor/whatever assertion from outside the class.
I had considered suggesting that, but I tend to go on and on.
from m5stack-sd-updater.
It looks like it prefers ChimeraCore for Core2; I changed the includes, but encountered:
downloader.h:40:25: fatal error: ESP32-targz.h: No such file or directory
Also, I see the TouchButtons must be Chimera-style; the current (w/o a new release number) M5Core2.h has different TouchButtons by RopG.
But just because I've never used ChimeraCore doesn't mean I can't; I'd still love to try this out.
I'll have to figure out what's necessary...
from m5stack-sd-updater.
oops it's probably looking for this library, I'm also preparing a more straightforward app downloader ^^
if not using the Chimera-Core, this is the M5Core2 fork you should be using : https://github.com/ropg/M5Core2/tree/visual
hopefully it'll land soon on the official repo
from m5stack-sd-updater.
Found this library as a valid example of double reset detection but I think I'll keep the NVS option for the meantime.
Followup on Rop's library : still showing some issues with detection at boot, but looks promising for code unification.
from m5stack-sd-updater.
bump
M5Core2 support enabled in the latest release, however it comes with constraints:
- User must implement "touch" logic by using early callback setters
- If no user implementation is done, ESP32-Chimera-Core is required
- Shows a lobby screen on every boot
Closing this as solved, feel free to reopen or add some followup if you feel something is missing or broken.
from m5stack-sd-updater.
Related Issues (20)
- [SD-App] Please add simple WiFi Setup app HOT 3
- Provide ready to flash .bin files in github releases page HOT 2
- M5Stack-SD-Menu does not work on a M5Stack-Faces (SD-Card problem) HOT 14
- Can't compile M5Stack-SD-Updater example - HOT 3
- error compiling HOT 2
- [SD-App] Please add ESP32-BLECollector HOT 2
- [SD-App] please add M5Core2 Currency Converter HOT 1
- [SD-App] Please add monopoldesign's M5Core2_Amiga HOT 1
- [SD-App] Please add WiFiChanViz HOT 1
- [SD-App] Please add ESP32-Tesseract
- SDLauncher: M5Stack core gray + SD <=> LoRa 868 RA-01H bus sharing conflicts HOT 14
- M5 Stack Core2 HOT 2
- Can you add botofancalin- multi app advance HOT 1
- Reporting a vulnerability HOT 1
- __has_include breaks under some conditions HOT 5
- M5Stack.h and SdFat.h combination causes compile error HOT 2
- AXP issue HOT 12
- CoreS3 HOT 11
- M5StickC Plus 2 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m5stack-sd-updater.