Fix error thrown during calorie tracking
This commit is contained in:
@@ -378,10 +378,10 @@
|
||||
const timeDiffSec = (endDate.getTime() - startDate.getTime()) / 1000;
|
||||
|
||||
// Calculate the energy(joules) expended based on power and time difference
|
||||
const energy = powerPerSec * timeDiffSec;
|
||||
const energy = power * timeDiffSec;
|
||||
|
||||
//Convert joules to calories
|
||||
return energy * 0.238902957619;
|
||||
return (energy * 0.238902957619) / 1000;
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user