diff options
Diffstat (limited to 'wasp/boards')
| -rw-r--r-- | wasp/boards/k9/watch.py.in | 4 | ||||
| -rw-r--r-- | wasp/boards/p8/watch.py.in | 4 | ||||
| -rw-r--r-- | wasp/boards/pinetime/watch.py.in | 4 | ||||
| -rw-r--r-- | wasp/boards/simulator/watch.py | 3 |
4 files changed, 15 insertions, 0 deletions
diff --git a/wasp/boards/k9/watch.py.in b/wasp/boards/k9/watch.py.in index b7bfabc..8360451 100644 --- a/wasp/boards/k9/watch.py.in +++ b/wasp/boards/k9/watch.py.in @@ -13,6 +13,7 @@ from drivers.nrf_rtc import RTC rtc = RTC(RTCounter(1, mode=RTCounter.PERIODIC, period=1, callback=_callback)) rtc.counter.start() +import gc import os import time @@ -135,3 +136,6 @@ try: except: drawable.string("FAILED", 0, 136, width=240) backlight.set(2) + +gc.collect() +free = gc.mem_free() diff --git a/wasp/boards/p8/watch.py.in b/wasp/boards/p8/watch.py.in index 9018a66..e133fee 100644 --- a/wasp/boards/p8/watch.py.in +++ b/wasp/boards/p8/watch.py.in @@ -13,6 +13,7 @@ from drivers.nrf_rtc import RTC rtc = RTC(RTCounter(1, mode=RTCounter.PERIODIC, period=1, callback=_callback)) rtc.counter.start() +import gc import os import time @@ -123,3 +124,6 @@ try: except: drawable.string("FAILED", 0, 136, width=240) backlight.set(1) + +gc.collect() +free = gc.mem_free() diff --git a/wasp/boards/pinetime/watch.py.in b/wasp/boards/pinetime/watch.py.in index fbda41e..6db9537 100644 --- a/wasp/boards/pinetime/watch.py.in +++ b/wasp/boards/pinetime/watch.py.in @@ -13,6 +13,7 @@ from drivers.nrf_rtc import RTC rtc = RTC(RTCounter(1, mode=RTCounter.PERIODIC, period=1, callback=_callback)) rtc.counter.start() +import gc import os import time @@ -125,3 +126,6 @@ try: except: drawable.string("FAILED", 0, 136, width=240) backlight.set(1) + +gc.collect() +free = gc.mem_free() diff --git a/wasp/boards/simulator/watch.py b/wasp/boards/simulator/watch.py index 98d9246..5aead3f 100644 --- a/wasp/boards/simulator/watch.py +++ b/wasp/boards/simulator/watch.py @@ -188,3 +188,6 @@ vibrator = Vibrator(Pin('MOTOR', Pin.OUT, value=0), active_low=True) def connected(): return not (int(rtc.uptime / 30) & 1) + +# Free memory cannot be measured on the simulator +free = 0 |
