Avatar for rigrig


Member since Apr 2020 • Last active Jun 2023
  • 11 conversations

Most recent activity

  • in Bangle.js
    Avatar for rigrig

    Actually, we might get away with just making it an attribute, and only calling Volley.newRequestQueue for the very first request (and cleaning it up in dispose). That way there is no need to sprinkle stop over all response/error handler code, and we don't need a full-blown singleton class either.

    Looking at 400-line switch statements makes me itchy though, so I'll try to submit a PR with some refactoring Soon, and include a fix for this.

    edit: PR

  • in Bangle.js
    Avatar for rigrig

    I wonder if it's related to Volley.newRequestQueue - maybe that should just be called once?

    I think that's it: looking at this, we should either call stop() on the queue once we have a response, or set up a singleton. Otherwise every request leaves a new "thread pool" lying about.

    If you just need to make a one-time request and don’t want to leave
    the thread pool around, you can create the RequestQueuewherever you
    need it and call stop() on the RequestQueue once your response or
    error has come back, using the Volley.newRequestQueue() method
    described in Sending a Simple Request. But the more common use case is
    to create the RequestQueue as a singleton to keep it running for the
    lifetime of your app, as described in the next section.

    (Calling stop() seems by far the easiest solution.)

  • in Bangle.js
    Avatar for rigrig

    I'm using Weather Notification myself (It's briefly mentioned at the bottom of the app readme), but wouldn't recommend it.
    (In 2020 it still looked maintained, and QuickWeather wasn't an option. Guess I'm just lucky that it kept working for me.)

  • in Bangle.js
    Avatar for rigrig

    Using the Weather Notification app, wind speed shows up ok.
    Using QuickWeather, the wind speed is set to 0.

    So it looks to be an issue with the QuickWeather<->GadgetBridge connection.

    (Thanks for posting this, I didn't know about QuickWeather, and it looks pretty neat)

  • in Bangle.js
    Avatar for rigrig

    Yes, if you put that code in a boot file it should work, except you also want to check that

    1. type === 'text': only show notifications/sms
    2. msg.t !== 'remove': only show new/modified messages

    The messages library README has some example code using E.showMessage().

  • in Bangle.js
    Avatar for rigrig


    That seems like a good idea (maybe also add setFontMono(int width)?)


    That looks good. (and font packs could override Graphics.prototype.setFontSize)

    try and find a font that would display the given text in the area. It might be good for messages...

    On the one hand: that seems overly complicated. I think messages should just use a fixed size and handle overflow: that will happen anyway, and showing short messages in a larger font doesn't seem worth the hassle. (with variable character size, I think we'd need to "try all sizes until one fits", not sure that is a good idea¹)
    On the other hand: if authors really want to use it, we don't want apps to "roll their own" if Bangle could do it for them.

    ¹ even though I wrote that code myself, regretting it now 😉

  • in Bangle.js
    Avatar for rigrig

    A new font format seems interesting, especially if you could add e.g. emojis.
    I don't get how it would be smaller than indexed bitmaps though?
    Edit: oh, variable width and just a \n after the last black pixel per line would help.

    I guess sometimes you still want to pick an exact font, for e.g. clock layouts? Maybe add Bangle.selectFont(size), and it gives you the best font to use for that size? Custom "font packs" could then override that function.
    Seems a bit clunky though g.setFont(Bangle.selectFont('30px')); :-(

  • in Bangle.js
    Avatar for rigrig

    For me it's always kind of hard to tell from pictures instead of the real watch, but I think it looks good in the menu bar.
    To me it looks just too small/large in the scroller, but we could maybe resize scroll items?

    say: "I want a bitmap font 20px high" and let Espruino choose?

    This would be nice to have. (And people could customize fonts globally without messing up layouts.)

  • in Bangle.js
    Avatar for rigrig

    Sorry for being a bit quiet about issues, somehow I expected to get things done during the holiday, but so far I haven't actually gotten round to coding at all :-(
    Hopefully I'll get some fixes in next week though.