TrailSene-Bangle.js/torch.trailsense.js

24 lines
425 B
JavaScript
Raw Permalink Normal View History

2022-06-05 07:52:06 +00:00
(() => {
function callbackFill(direction) {
if(direction == 1) {
g.setColor(255,255,255);
} else {
g.setColor(255,0,0);
}
g.fillRect(0, 0, g.getHeight(), g.getWidth());
}
function drawFace() {
g.setColor(255,255,255);
g.fillRect(0, 0, g.getHeight(), g.getWidth());
Bangle.on("swipe", callbackFill);
}
function stop() {
Bangle.removeAllListeners();
2022-06-05 07:52:06 +00:00
}
return { drawFace:drawFace, stop:stop };
})();