Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Need help - problem with elevationGoal and caloriesGoal data

ANSWERED

Hello,

 

Fitbit.jpg

 

I wonder if someone can help me or confirm that there is a reported bug here. But it seems that I can not get correct goal data from "elevationGoal" and "caloriesGoal".FitbitAs you can see, I am getting different values for "Progress Arcs" for both. Code is as below...

const elevationGoal = userActivity.goals.elevationGain;

and then..

  const metricElevation = "elevationGain";
  const amountElevation = userActivity.today.adjusted[metricElevation] || 0;

and finally...

  dailystairs.innerText = amountElevation;
  let elevationAngle = Math.floor(360*(amountElevation/elevationGoal));
  if ( elevationAngle > 360 ) {
    elevationAngle = 360;
    elevationRing.fill="#58e078";
  }
  elevationRing.sweepAngle = elevationAngle;

Similar code for Calories as well.. Any help is greatly appreciated.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Thanks for raising this, I've recreated the issue here and I've logged a ticket for the firmware team. Hopefully will be fixed in an upcoming update!

View best answer in original post

Best Answer
0 Votes
4 REPLIES 4

Thanks for raising this, I've recreated the issue here and I've logged a ticket for the firmware team. Hopefully will be fixed in an upcoming update!

Best Answer
0 Votes

Thanks Jon, in that case I will leave the code as it is for now.

Best Answer
0 Votes

Hi Jon,

 

It look like that this bug has not been fixed in the latest firmware! Any idea, when will it be? Thanks...

Best Answer
0 Votes

Sorry the fix didn't make it into the release, but will be included in the next update. I can't make any promises, but it will be available by the time the gallery launches.

Best Answer
0 Votes