You are reading a single comment by @Ganblejs and its replies. Click here to read the full conversation.
  • You mean for hworldclock itself after the merge?

    yes.

    Actually works only once, it seems some more cleanup is needed

    Bummer, I hoped it was easier. Could you guys help me to tidy up the watchface somehow?
    It might look as I'm a programmer, but most I do is copy&paste (like a senior programmer - but without the background knowledge :) )

  • @Gordon and @halemmerich have given some pointers following comment #63 in the POC-thread. Information on how to declare functions with let to have them cleared on app exit is in comment #48.

    It basically boils down to:

    1. Wrap all your app code inside outer curly brackets: { all app code inside }
    2. Initialize variables with let or const, to utilize garbage collection.
    3. Define functions by: let myfun = function() { ... } instead of function myfun() { ... }, also to utilize garbage collection.
    4. Add to Bangle.setUI: remove : someRemoveFunction
    5. EDIT as per @halemmerich's post below: Clear timeouts/invervals etc in someRemoveFunction in the step above.
    6. Use Bangle.showLauncher(), Bangle.showClock() or Bangle.load() instead of load().

    For now it's generally best to only implement fast switching between clocks and launchers, and not for launching other apps or switching between them.

    There're also instructions going into the hardware reference here following line 5171.

    Examples where it's implemented: Slope clock, Desktop Launcher.

    EDIT: Using the RAM Widget have helped me during development. @Gordon has also suggested entering process.memory().usage into the console field of the Web IDE to get precise measurements. See @halemmerich tips below as well.

About

Avatar for Ganblejs @Ganblejs started