|
@@ -1,6 +1,4 @@
|
|
|
-"""
|
|
|
-tested on uiflow for stickc v1.8.1
|
|
|
-"""
|
|
|
+
|
|
|
|
|
|
import json
|
|
|
|
|
@@ -42,12 +40,12 @@ def _get_current_daytime() -> int:
|
|
|
|
|
|
|
|
|
def _sleep(duration_seconds: int) -> None:
|
|
|
-
|
|
|
- axp.setLcdBrightness(30)
|
|
|
+
|
|
|
+ axp.setLDO2State(False)
|
|
|
+ axp.setLDO3State(False)
|
|
|
machine.lightsleep(duration_seconds * 1000)
|
|
|
-
|
|
|
- axp.setLcdBrightness(100)
|
|
|
- print("wake reason:", machine.wake_reason())
|
|
|
+ axp.setLDO2State(True)
|
|
|
+ axp.setLDO3State(True)
|
|
|
|
|
|
|
|
|
def _random() -> float:
|
|
@@ -196,7 +194,7 @@ class App:
|
|
|
_DEFAULT_FONT_COLOR,
|
|
|
rotate=90,
|
|
|
)
|
|
|
- machine.Timer(0).init(
|
|
|
+ machine.Timer(0).init(
|
|
|
period=4000,
|
|
|
mode=machine.Timer.PERIODIC,
|
|
|
callback=lambda t: self._clock_text_box.setText(self._format_time()),
|