Update M5 state before initializing new app

Ensures button presses are cleared before loading a new interface.
This commit is contained in:
Correl Roush 2023-01-28 22:57:23 -05:00
parent 2afceed781
commit 2e538acca4

View file

@ -225,6 +225,7 @@ void setup(void) {
void switch_app(App::Choices next) { void switch_app(App::Choices next) {
app->shutdown(); app->shutdown();
delete app; delete app;
M5.update();
switch (next) { switch (next) {
case App::Clock: case App::Clock:
app = new Clock; app = new Clock;