Skip to content

Commit 5b7b21a

Browse files
Fix poweroff button
1 parent 8102a74 commit 5b7b21a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Settings: add Timezone configuration
66
- Draw: new app for simple drawing on a canvas
77
- IMU: new app for showing data from the Intertial Measurement Unit ("Accellerometer")
8+
- Speed up QR decoding 4x - thanks @kdmukai!
89

910

1011
0.0.8

internal_filesystem/lib/mpos/ui/topmenu.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ def sleep_event(e):
301301
restart_label.set_text(lv.SYMBOL.REFRESH+" Reset")
302302
restart_label.center()
303303
def reset_cb(e):
304+
mpos.ui.remove_and_stop_current_activity() # make sure current app, like camera, does cleanup, saves progress, stops hardware etc.
304305
import machine
305306
if hasattr(machine, 'reset'):
306307
machine.reset()
@@ -317,7 +318,7 @@ def reset_cb(e):
317318
poweroff_label.center()
318319
def poweroff_cb(e):
319320
print("Power off action...")
320-
remove_and_stop_current_activity() # make sure current app, like camera, does cleanup, saves progress, stops hardware etc.
321+
mpos.ui.remove_and_stop_current_activity() # make sure current app, like camera, does cleanup, saves progress, stops hardware etc.
321322
import sys
322323
if sys.platform == "esp32":
323324
#On ESP32, there's no power off but there is a forever sleep

0 commit comments

Comments
 (0)