I recently upgraded my firmware to the cutting edge build espruino_2v24.125_banglejs2.zip to have the new Alarm update (long press to toggle alarm) and it introduced two bugs in my Elapsed Time app.
The first one: it is not possible anymore to add or substract two dates, as it returns NaN. The comparison operators also don't work anymore. The fix is easy : just add .getTime().
The second one is more tricky. It seems like when the touch event calls a scroller, like this:
Bangle.on('touch', function (zone, e) {
if (!inMenu && e.y > 24) {
if (drawTimeout) clearTimeout(drawTimeout);
showMainMenu();
inMenu = true;
}
});
Then the scroller is displayed, and immediately the menu row located where the touch event was is called. So it immediately goes into whatever menu item that was "under" the touch.
Not sure if I make much sense explaining it but here attached is a video that shows it: I tap the screen and the menu is displayed, and immediately the Date item is called because that's where my finger was.
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.
Hello,
I recently upgraded my firmware to the cutting edge build
espruino_2v24.125_banglejs2.zip
to have the new Alarm update (long press to toggle alarm) and it introduced two bugs in my Elapsed Time app.The first one: it is not possible anymore to add or substract two dates, as it returns
NaN
. The comparison operators also don't work anymore. The fix is easy : just add.getTime()
.Example from the console:
The second one is more tricky. It seems like when the
touch
event calls a scroller, like this:Then the scroller is displayed, and immediately the menu row located where the touch event was is called. So it immediately goes into whatever menu item that was "under" the touch.
Not sure if I make much sense explaining it but here attached is a video that shows it: I tap the screen and the menu is displayed, and immediately the Date item is called because that's where my finger was.
Do you have any ideas on how to fix this?
Thanks
1 Attachment