You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi!

    Generally on Espruino scrolling only works on offscreen buffers, but on Bangle.js it's a bit of a special case because as you note there's a bigger screen buffer than is displayed, and the display controller allows us to move the display window around within it - it makes scrolling super fast.

    The screen is 240x240 but the buffer is 240x320. As such you can only scroll vertically, and the notifications perform a bit of magic to allow them to be drawn on the extra 80 rows of the buffer while everything else still goes to the 'normal' 240 rows.

    What is the benefits of double buffered mode?

    Draw operations are faster, there's no flicker, and you can read back data with getPixel. Also you can scroll horizontally.

    Does using scrolling use more ram than not using scrolling?

    No - the RAM was always there in the display, just not getting used. Since we can't read back from it, it can't be used for anything other than the display.

    is there any library written to handle line-wrapping text, so that it doesn't go off-screen?

    Afraid not - there is the code built into the notify library though. It would actually make a pretty useful module.

    When is 'terminal' mode useful?

    You mean Terminal.println and Terminal.setConsole? It's just an easy way to write text. Generally you wouldn't use it for an app, but if you want to write an error to the screen quickly it's a good way of doing it (and Espruino does that automatically if 'Debug Info' is set to 'show').

    Theoretically if you added a Bluetooth LE keyboard you could use the Terminal to actually write JS code as you might on the left-hand side of the IDE.

About

Avatar for Gordon @Gordon started