Most recent activity
-
-
-
-
-
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/xxlmessageMy issues are:
- When the message scrolls and another message arrives, I think, both messages are displays simultaneously, which causes a slowdown.
- g.setFont('6x8:5x9') is slow, maybe? Is there a way skip loading the font again and again for each frame to render?
- Bangle.on('touch', function (b, xy) { xxl.stop(); }); does not really work. I think the drawing keeps the CPU too busy.
- Must I undo the setWatch(xxl.stop, BTN1) when I leave the listener with load()?
- 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.
- Is there any way to speed things up?
- When the message scrolls and another message arrives, I think, both messages are displays simultaneously, which causes a slowdown.
-
-
Thank you.
When I receive a message inBangle.on("message", (type, msg) => require("xxlmessage").listener(type, msg));
and I want to show a scrolling message, I need a timeout for the redraw, and a variable holding the current scroll position.
So I can make a global variable like:var scrollPosition=0; var scrollTimeout; exports.messageListener = function(type, msg) { }
Now, when I exit this code, by calling load(), will the global variables 'scrollPosition' etc. be freed from memory?
Also, can I break things, if my global variables have names that are used in other apps or the system?
I ask, because this code is in boot.js and thus always loaded. Will 'require()' load the js file on demand? What is the variable scope? The scope of require(), or global?
I got another watch, that showed the same problem again after a year and a 3rd one to use now. I opened the 2nd watch and it was not wet. The button just permanently toggles pressing for no reason. When I unplug the button from the pcb, it stops doing that. I fear that the button or it's board is.. not tough enough.
Is there a spare part button, I can get? I wish I could find a water proof button that sort of fits into the case...