Posted on
of 2
/ 2
  • Same result. I tried out to put the whole Bangle.setUI({ block underneath.

  • Well, I don't think I have any more suggestions then sadly :/ :p

  • YAY, now it worked.

    That is soooo strange!
    I have the

    const BANGLEJS2 = process.env.HWVERSION == 2;

    at the top of my code.

    console.log BANGLEJS2;

    shows "true".
    But the following "if (BANGLEJS2) { " is not entered! No clue what happens there.

    When I remove the check fpr BJS2, it works.

    Another problem is that I get

    Uncaught Clock has no widgets, can't fast load

    When leaving the launcher despite i do load and show widgets at the end of my code.

  • You have your BANGLEJS2 constant defined in the big scope for cleanup and the handler is run in the global context. The variable does not exist there and is undefined so the check never triggers. To solve that either move the declaration out of the block and later delete global.BANGLEJS2 in the remove method or access process.env.HWVERSION for every check instead of storing the result in a constant. Same applies to stuff running in timeouts and intervals.

    For the "has no widgets" message, maybe you need to update the clockHasWidgets value stored in the settings file? It was possibly set at a time where your clock did not yet have loadWidgets. You can update that by just setting the clock again in the settings app.

  • I actually also tried to check for

    process.env.HWVERSION == 2

    and it didn't work.

    Got it with the settings. It seemed to be necessary to assign the default clock again in the settings. Thank you all for those many hints!

  • setting.json is the file I meant, it caches if the last set clock had widgets at that time. Rewriting the settings currently just recreates the .boot0 file, that would not help in this case.
    Just go into the settings app
    -> System
    -> Select Clock
    -> Select your clock, even if already selected

    That will recheck if the clock has a loadWidgets call and update the cached value accordingly. You can check the value by opening setting.json in the IDE before and after.

  • @Serj i was thinking of a config setting that allows you to set the rotation level to 180(default), disabled, 90 and 270.
    That way you can swipe from 0 to the configured value and back.
    Would that fit your use case?

  • I think yes, thanks 👍

    Is it possible to combine rotation with pattern through this application?
    So that any swipe can be assigned to a rotation?

  • You can't do it for every app (at least not easily) because we don't have a standard way of redrawing the screen defined - once the screen is rotated we need to ask the app to redraw, and there's no way of doing that at the moment

  • I'm glad you added the option to switch off the rotation in the settings, the display was never in the correct position for me to watch it. Still, I used the settings to put rotation on "off", but it actually works anyway :/.

  • Currently the rotation is set back to 0° when set to "off". I will not touch rotation settings when set to "off" from the next version on.
    Maybe I'll also distinguish 0° and off eventually; not sure yet.

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


Posted by Avatar for Hank @Hank