I was a bit annoyed that when setting the time the hours did not wrap.
So when going up it would stuck at 23 instead of wrapping to 0 and when going down it would be stuck at 0.
I tried to change this by modifying the Hour section of showSetTimeMenu in settings.js to this:
'Hour': {
value: d.getHours(),
min: -1,
max: 24,
step: 1,
onchange: v => {
d = new Date();
d.setHours((v+24)%24);
setTime(d.getTime() / 1000);
}
},
I thought that would to the trick but to no avail.
I did overwrite settings.js on the bangle; that did not work, then I rebooted but still no luck.
I've read back settings.js to verify that it is actually the modified version and it is.
What am I doing wrong ???
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I was a bit annoyed that when setting the time the hours did not wrap.
So when going up it would stuck at 23 instead of wrapping to 0 and when going down it would be stuck at 0.
I tried to change this by modifying the Hour section of showSetTimeMenu in settings.js to this:
I thought that would to the trick but to no avail.
I did overwrite settings.js on the bangle; that did not work, then I rebooted but still no luck.
I've read back settings.js to verify that it is actually the modified version and it is.
What am I doing wrong ???