new app "XXL Messages" - need coding advice

Posted on
  • I made an app that replaces the MessagesUI app for people with bad eyesight. So it just displays new messages with a large font and when you push the button, you return to the clock.
    Here's the beta-app:
    https://kungphoo.github.io/BangleApps/?q=xxl
    Here's the code:
    https://github.com/KungPhoo/BangleApps/tree/master/apps/xxlmessage

    My issues are:

    1. When the message scrolls and another message arrives, I think, both messages are displays simultaneously, which causes a slowdown.
    2. g.setFont('6x8:5x9') is slow, maybe? Is there a way skip loading the font again and again for each frame to render?
    3. Bangle.on('touch', function (b, xy) { xxl.stop(); }); does not really work. I think the drawing keeps the CPU too busy.
    4. Must I undo the setWatch(xxl.stop, BTN1) when I leave the listener with load()?
    5. I put all code inside a xxl {} structure. Is there a better way to do this? I was afraid of using global variables in a listener function.
    6. Is there any way to speed things up?
  • g.setFont('6x8:5x9') is slow, maybe

    It shouldn't be - the call itself will be fast, and upscaling the built-in font should be reasonably quick

    Bangle.on('touch', function (b, xy) { xxl.stop(); }); does not really work.

    It should - maybe add some prints to the rendering function and see if it really is taking ages.

    Must I undo the setWatch

    Not with load(), no. You'd asked on another post about vars, but basically load() tears everything down so you don't have to worry.

  • My drawing routine can do about 30 fps, so somewhere there is a bottleneck.

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

new app "XXL Messages" - need coding advice

Posted by Avatar for gfric @gfric

Actions