• I'm confused. Bangle.js 2 has a '3 bit colour LCD display'.
    With firmware 2V09, this translates nicely to :

    >process.version
    ="2v09.120"
    >g.theme
    ={ fg: 0, bg: 7, fg2: 1, bg2: 3,
      fgH: 0, bgH: 1, dark: false }
    >g.getBPP()
    =3
    > 
    

    But with firmware 2V10, the result confuses me :

    >process.version
    ="2v10.89"
    >g.theme
    ={ fg: 0, bg: 65535, fg2: 31, bg2: 2047,
      fgH: 0, bgH: 2047, dark: false }
    >g.getBPP()
    =16
    > 
    

    Why does it return 16 bits per pixel ? And those 16 bit color values ?

    All of these questions because I have an application running on both 2V09 and 2V10 firmwares and the user can save his preferred colour scheme. The (saved) colour values for 2V09 were 0..7 and now 2V10 apparently expects 0..65535. The saved preferences result in a troubled display, with unreadable menus for changing the user colour, causing a lot of havoc of course.

    (I can't seem to find the 'What's changed' for 2V10 - can someone provide a link - thanks)

  • Argh, yes - sorry. There's a change log here: http://www.espruino.com/ChangeLog

    But yes, Bangle.js 2 has a 3 bit display. However it was causing a lot of difficulties as basically everything (including icons) had to be specifically 3 bit only - any normal icons would render really badly.

    So, to work around this I added dithering. 3 bit images/colors render as-is, but any color inbetween gets dithered. However to dither, the colors have to then be more than 3 bits, and it seemed to make sense to use the same 16 bit depth so things like the theme colors didn't vary between devices.

    I tweaked the settings to set the theme in a more bpp-agnostic way: https://github.com/espruino/BangleApps/blob/master/apps/setting/settings.js#L184-L194

    But unfortunately you've got stuck in the middle a bit - as you were on hardware that I haven't yet pushed out to everyone I didn't bother too much about safety-checking the changes.

    If you delete the settings file chances are it'll come back up with the defaults and you'll be good to go though - sorry about that. Thinking about it g.getBPP() should probably still return 3, even though internally the current color are stored as 16 bit.

  • @Gordon, I guess the color flip of red (RGB) to blue (BGR or BRG) for Bangle.js 2 requires similar attention.

  • @allObjects not sure I understand. You mean in the emulator? That was just an emulator bug which should now be fixed if you refresh

  • @Gordon, I guess that's what I meant. Depending on which Bangle / display is emulated, the bits have to be mapped accordingly. I assume - for performance reasons - the bits are already stored the way - in number and in sequence - as they are needed to be pushed to the controller.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Bangle.js 2 - Graphics getBPP() and .theme differ 2v09 vs 2v10

Posted by Avatar for jgw @jgw

Actions