summaryrefslogtreecommitdiff
path: root/wasp
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2021-02-20 08:42:16 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2021-02-20 08:42:16 (GMT)
commit090ed8489ba830879a8dfa094a05fc178020fa4f (patch)
treedf8bcc424f2b05e7bee3dda0ad0c38638ccfc2c4 /wasp
parenta0ee26a41204b8ec7fb54d788c0e179133ceb5e6 (diff)
apps: settings: Clamp the dates a little more tightly
Currently a couple of down presses on the year results in the time being set to some time in 2099. The micropython date logic does not support dates this far in the future and throws an exception. Adopt a simple fix that should be OK for the next 39 years ;-) . Reported-by: Christopher Peters <me@christopherp.de> Fixes: #167 Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp')
-rw-r--r--wasp/apps/settings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wasp/apps/settings.py b/wasp/apps/settings.py
index dcd0910..6c5b664 100644
--- a/wasp/apps/settings.py
+++ b/wasp/apps/settings.py
@@ -36,7 +36,7 @@ class SettingsApp():
self._MM = wasp.widgets.Spinner(130, 60, 0, 59, 2)
self._dd = wasp.widgets.Spinner(20, 60, 1, 31, 1)
self._mm = wasp.widgets.Spinner(90, 60, 1, 12, 1)
- self._yy = wasp.widgets.Spinner(160, 60, 20, 99, 2)
+ self._yy = wasp.widgets.Spinner(160, 60, 20, 60, 2)
self._settings = ['Brightness', 'Notification Level', 'Time', 'Date']
self._sett_index = 0
self._current_setting = self._settings[0]