Avatar for fbedussi

fbedussi

Member since Apr 2020 • Last active Jun 2020
  • 4 conversations
  • 13 comments

Most recent activity

  • in Bangle.js
    Avatar for fbedussi

    Hi @Gordon basically the behavior is the one shown in the video, the bug shows up once every 10/20 clicks.

    I cannot identify anything specific that makes this happen, it happens both with code loaded via IDE and via the app loader.

    lines starting with a 'greater than' denote quoted text

  • in Bangle.js
    Avatar for fbedussi

    Hi everybody,
    I need to include a '.tfmodel' file in my app to recognize gestures, but when I add the reference in the apps.json file:

    {
            "name": ".tfmodel",
            "url": "timer-tfmodel.js",
            "evaluate": true
          },
    

    under my app entry, the sanitycheck fails with this message:

    ERROR: App gesture storage file .tfmodel is also listed as storage file for app timer

    Can I change the name, e.g. ".tfmodel-timer"? Should I omit the reference? What else?

    Thanks in advance :-)

  • in Bangle.js
    Avatar for fbedussi

    @Gordon I finally managed to get a video of the bug in action:
    https://youtu.be/GPwXgH1iBNU


    as you can see I'm not touching the screen, the watch is running the code in the gist, clicking BTN3 sometimes causes watches on BTN4 (+ 1 minute) and BTN5 (+ 1 second) to fire

  • in Bangle.js
    Avatar for fbedussi

    Hi @Robin, thanks for your message. Maybe there is some low level bug somewhere, I'm still experiencing my issue from time to time, even if much less frequently than in the first place.

    I'm coding on MacOS, but I don't think this matters that much, since the issue appears only on the physical Bangle.js.

  • in Bangle.js
    Avatar for fbedussi

    BTW @Tx thanks for you reply, but arrow functions are not the cause. They work fine in all other scenarios, and I tried to replace them with anonymous functions, but this didn't solve the issue (when there was a issue).

  • in Bangle.js
    Avatar for fbedussi

    I tried to make a video to show the bug on the watch, but, surprise! Today I cannot reproduce it any more. Yesterday it was there for sure, but I didn't manage to take a video of it.

    This already happened to me and drives me mad: there are sometimes bugs that are just inexplicable and that after a while disappears magically, it looks like there is some sort of cache that after a while expires and clear the bug, is that the case?

  • in Bangle.js
    Avatar for fbedussi

    Hi everybody,
    I have this code:

    clearWatch();
    setWatch(() => {
      console.log('\-----');
      console.log('BTN3');
      btn3Handler()
    }, BTN3, {
      debounce: DEBOUNCE,
      repeat: true,
      edge: "falling"
    });
    setWatch(() => {
      console.log('BTN4');
      btn4Handler()
    }, BTN4, {
      debounce: DEBOUNCE,
      repeat: true,
      edge: "falling"
    });
    

    When I press BTN3 I get often (not always) get this in console:

    \----
    BTN3
    BTN4
    

    It looks like BTN4 fires together with BTN3.

    The only workaround I found is this ugly one (clear watches before calling the handler and reattach them after):

    clearWatch();
    setWatch(() => {
      console.log('-----');
      console.log('BTN3');
      clearWatch();
      btn3Handler();
      addWatch();
    }, BTN3, {
      debounce: DEBOUNCE,
      repeat: true,
      edge: "falling"
    });
    setWatch(() => {
      console.log('BTN4');
      btn4handler();
    }, BTN4, {
      debounce: DEBOUNCE,
      repeat: true,
      edge: "falling"
    });
    

    The issue doesn't happen in the emulator, just on the real clock.

    This is the gist with the complete code (the issue is at line 119):
    https://gist.github.com/fbedussi/05f7beeĀ­30cf7fbc43a3dbfa728c5edb2

    Is this a bug or am I missing something?

    thanks and kudos for the project!

Actions