Avatar for user147320

user147320

Member since Jul 2022 • Last active Aug 2022
  • 0 conversations
  • 4 comments

Most recent activity

  • in Bangle.js
    Avatar for user147320

    In two days on 2.14.149 i had no problems with wrong readings, so that may have solved it

  • in Bangle.js
    Avatar for user147320

    Does this happen all the time, or is it just occasional calls that give you bad readings?

    When it happened every reading before a reboot returned the last valid values, every reading after a reboot returned a 0 for temperature and pressure. Every single reading until the battery was flat.

    What firmware version do you have? I did make some improvements to setBarometerPower in a recent build, so if you try one of the 2v14.xxx cutting edge builds this may work better for you?

    I use 2.14. I was not aware of 2.14.149 and will try it out.

    You could try calling Bangle.isBarometerOn() before you run your code, to see if some other app/widget is keeping the barometer on and causing issues?

    I know that Recorder accesses the Barometer in the background.
    I tried turning the Recorder off and printing the result of Bangle.isBarometerOn() in my App regularly and the result confuses me.
    When i call Bangle.getPressure and get a result that is not "undefined" the sensor shuts down after performing the handler.
    If however the reading is "undefined" the sensor stays on until i stop the application, regardless of future calls with valid readings.
    This holds for 2.14 and 2.14.149.
    I do not know if this is correlated to having only readings of 0, but seems wrong either way.

    However it's extremely rate hardware gets locked up - if something like this happens routinely then it's unlikely to be a 'hardware lockup' that is the issue

    I cannot think of another explanaition since rebooting and powering off for a few minutes did not help and Indridi found that a firmware reset did not help either.
    Only draining the battery seems to help.

  • in Bangle.js
    Avatar for user147320

    It happened again and now i am relatively certain it is not only my code, unless i understood something fundamentally wrong.
    I changed my handler to

    function handlePressure(p) {
          if (p===undefined) {
            return;
          }
          [do handling here]
    }
    

    and it still happened.

    My best guess is, that it is a problem that my clock-face and the recorder access the pressure at the same time, but i currently do not know how to verify or circumvent this except never displaying the pressure or temperature while the recorder records it.

    Furthermore keeping the clock powered off for a while does not help, is there any other way to reset the sensors except draining the battery (which i am afraid will damage the battery)?

  • in Bangle.js
    Avatar for user147320

    Thank you!
    I had the exact same problem draining the battery helped!
    I did not think of trying the power-off function (i only restarted multiple times to no avail).

    My cause may be similar, although i did not try power-cycling it myself.
    Instead i tried to copy the workaround from the barometer app and apparently failed.
    My pressure handler is currently

    function handlePressure(p) {
      if (p===undefined) {
        setTimeout(() => Bangle.getPressure().then(handlePressure­), 500);
        return;
      }
      [do handling here]
    }
    

    and i call it every minute by

    Bangle.getPressure().then(handlePressure­);
    

    which seems to confuse the sensor.

Actions