Hi! Ahh, that's an interesting problem - I'd always intended the .flip to be used for games and stuff like that so it made sense to make it keep the display on. In your case it doesn't seem useful at all.
That way you can have everything coexist with widgets as well - if you're planning on using it for 6 hours or so, battery level and stuff like that might be handy.
That way you can use g.drawImage (g.flip is used in the example just to keep the screen on).
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! Ahh, that's an interesting problem - I'd always intended the
.flip
to be used for games and stuff like that so it made sense to make it keep the display on. In your case it doesn't seem useful at all.What I'd suggest is to actually use an offscreen buffer if you can... So something like is done here: https://github.com/espruino/BangleApps/blob/master/apps/speedo/speedo.js
That way you can have everything coexist with widgets as well - if you're planning on using it for 6 hours or so, battery level and stuff like that might be handy.
That way you can use
g.drawImage
(g.flip
is used in the example just to keep the screen on).The speedo uses a single color - I'm not sure if that'd work for you? You can use a color palette to do the lookup if you need more colors though: https://github.com/espruino/BangleApps/blob/master/apps/gpsnav/app.js#L7