Bangle.on('touch', (b,e) => {
e.x += 20;
e.altered = true; // a new field
});
Bangle.on('touch', (b,e) => {
print(e);
g.clear(1).fillCircle(e.x, e.y, 5);
});
It appears to be working, printing stuff like { "x": 64, "y": 25, "type": 0, "altered": true }.
But yes, if you can show us what you've got we can take a look. Adding a field to the object is a good way to see if you've been able to actually change what's in it...
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.
Hi - just as a quick test, if you do:
It appears to be working, printing stuff like
{ "x": 64, "y": 25, "type": 0, "altered": true }
.But yes, if you can show us what you've got we can take a look. Adding a field to the object is a good way to see if you've been able to actually change what's in it...