You are reading a single comment by @HughB and its replies. Click here to read the full conversation.
  • I am wondering about widpedom though and the step event.

    Have now flashed my bangle 1 and 2 with 2v10.27 so should be able to do some real world tests against the actual firmware now rather than the javascript version.

    Does Widpedom get 6 step events when the firmware passes through the state machine to reach 6 steps ?

      Bangle.on('step', (up) => {
        let date = new Date();
        if (lastUpdate.getDate() == date.getDate()){
          stp_today ++;     // only gets one step when 6 would be returned by the state machine
        } else {
          // TODO: could save this to PEDOMFILE for lastUpdate's day?
          stp_today = 1;
        }
        ....
    

    During the day there can be 200 passes through the state machine that would result in 6x200 steps. 1200 steps. If the firmware only returns 1 step for these events then at the end of the day widpedom will be 1000 steps short.

    Have just verified experimentally that widpedom is only counting one step for the first 6 steps of the state machine. I think either a) Bangle.on('step') needs to provide a step size value of 1 or 6. OR b) the firmware will need to send 6 step events when it moves from S_STEP_22N to S_STEPPING state OR c) need a Bangle.getSteps() which will return the number of steps since the last reboot or something like that.

About

Avatar for HughB @HughB started