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>
This commit is contained in:
parent
a0ee26a412
commit
090ed8489b
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ class SettingsApp():
|
||||||
self._MM = wasp.widgets.Spinner(130, 60, 0, 59, 2)
|
self._MM = wasp.widgets.Spinner(130, 60, 0, 59, 2)
|
||||||
self._dd = wasp.widgets.Spinner(20, 60, 1, 31, 1)
|
self._dd = wasp.widgets.Spinner(20, 60, 1, 31, 1)
|
||||||
self._mm = wasp.widgets.Spinner(90, 60, 1, 12, 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._settings = ['Brightness', 'Notification Level', 'Time', 'Date']
|
||||||
self._sett_index = 0
|
self._sett_index = 0
|
||||||
self._current_setting = self._settings[0]
|
self._current_setting = self._settings[0]
|
||||||
|
|
Loading…
Reference in a new issue