Skip to content

Commit 5e11a77

Browse files
authored
Merge pull request SHA2017-badge#174 from SHA2017-badge/sleep-in-launcher
Add set_timeout to power management
2 parents 1cd5ed7 + eb58fbb commit 5e11a77

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

esp32/modules/tasks/powermanagement.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# File: powermanagement.py
2-
# Version: 1
2+
# Version: 2
33
# Description: Power management task, puts the badge to sleep when idle
44
# License: MIT
55
# Authors: Renze Nicolai <renze@rnplus.nl>
66

77
import virtualtimers, deepsleep, badge, sys
88

9-
10-
119
requestedStandbyTime = 0
1210
onSleepCallback = None
1311

@@ -54,3 +52,8 @@ def callback(cb):
5452
''' Set a callback which is run before sleeping '''
5553
global onSleepCallback
5654
onSleepCallback = cb
55+
56+
def set_timeout(t):
57+
''' Set timeout '''
58+
global userResponseTime
59+
userResponseTime = t

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy