From 090ed8489ba830879a8dfa094a05fc178020fa4f Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sat, 20 Feb 2021 08:42:16 +0000 Subject: [PATCH] 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 Fixes: #167 Signed-off-by: Daniel Thompson --- wasp/apps/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]