mirror of
https://github.com/firewalkwithm3/Sensor-Watch.git
synced 2024-11-23 03:30:30 +08:00
time set: allow setting year through 2050
This commit is contained in:
parent
16048e0c20
commit
34d72e3296
|
@ -66,8 +66,8 @@ bool set_time_face_loop(movement_event_t event, movement_settings_t *settings, v
|
||||||
date_time.unit.second = 0;
|
date_time.unit.second = 0;
|
||||||
break;
|
break;
|
||||||
case 3: // year
|
case 3: // year
|
||||||
// only allow 2021-2030. fix this sometime next decade
|
// only allow 2021-2050. fix this if we make it that far.
|
||||||
date_time.unit.year = ((date_time.unit.year % 10) + 1);
|
date_time.unit.year = ((date_time.unit.year % 30) + 1);
|
||||||
break;
|
break;
|
||||||
case 4: // month
|
case 4: // month
|
||||||
date_time.unit.month = (date_time.unit.month % 12) + 1;
|
date_time.unit.month = (date_time.unit.month % 12) + 1;
|
||||||
|
|
Loading…
Reference in a new issue