-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undefined function in binary.js inside the published npm package #28
Comments
Hey, that's correct it's a bug most probably.
I'll be fixing this somewhere next week if that is ok with you
…On Tue, 14 Sep 2021, 20:02 Thomas Champagne, ***@***.***> wrote:
Hey @jimmykane <https://github.com/jimmykane>,
I'm looking to understand why every cycling dynamics stats like
avg_left_power_phase, avg_left_power_phase_peak are returning NaN values
inside this library (file used: 7386755164.zip
<https://github.com/jimmykane/fit-parser/files/7163804/7386755164.zip>).
1 - I noticed that in the npm distributed package (v1.9.0) the following
file node_modules\fit-file-parser\dist\binary.js has an error. Indeed
inside function readData the following line:
return dataView.getUnt8(0, fDef.littleEndian);
Should be
return dataView.getUint8(0, fDef.littleEndian);
getUnt8 function doesn't exists, the getUint8 yes !
2 - Aside this, the readData from repository is not the same than the npm
package. Why? I was unable to find tag 1.9.0 on this repository.
Thanks for your help !
Thomas
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVX473FKY45EB5RKSXS6TUB55ZPANCNFSM5EATCETQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
It's perfect :) Thanks ! By the way, I switched from npm package to current repository The activity used to fetch cycling dynamics stats is https://connect.garmin.com/modern/activity/7386755164 (https://github.com/jimmykane/fit-parser/files/7163804/7386755164.zip) Thanks ! |
You will also find below the CSV export of this fit file using the java java -jar FitCSVTool.jar 7386755164.fit Gives: 7386755164_FitCSVTool_export.csv.zip Power phase like data is returned as is for instance: Once this npm publish et field fixed I will provide new fields I identified through a PR. And also in a Thanks again! Thomas |
Hey @jimmykane . Have you been able to take a look at this? Thanks to you ! |
Not yet buddy. Broke my toe and have been a bit strange. Next week should
be fixed. I have also some time free so I promise.
…On Fri, 24 Sep 2021, 16:05 Thomas Champagne, ***@***.***> wrote:
Hey @jimmykane <https://github.com/jimmykane> . Have you been able to
take a look at this? Thanks to you !
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJVX44MVTR6V45ITWSCCD3UDRZP7ANCNFSM5EATCETQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Ouch ! Hope you're fine and can walk by the way? It can wait. Have a good recovery !!! |
I took a look and strangle this part of issue is not in the code of this repo. :-O |
@thomaschampagne I tested your file after some fixes here and there and works ok. I also released sports-alliance/sports-lib v5.4.24 that should have this fixed |
Hi @jimmykane. (1) About the power I was probably unclear :D I was talking about the L/R power phase which is a angle between 0 to 360 degrees. This is what you can see there (https://connect.garmin.com/modern/activity/7386755164): This angle/phase L/R data is parsed as I think the issue comes from how the data is formatted inside the FIT protocol (see #28 (comment)) (2) Just to mention it, I updated to I hope your toe goes better? Thanks again, Thomas |
Undefined was fixed. It was the issue in src , strange I had not spotted it. Can you try if this by any way fixes the l_power_phase etc? If else I think those fields are not implemented for decoding. This will take a few |
@thomaschampagne version 1.9.3 with fix to the unknown function is out |
I try this this evening! I let you know |
Hello, |
Hello, REgards |
Hey @jimmykane,
I'm looking to understand why every cycling dynamics stats like
avg_left_power_phase
,avg_left_power_phase_peak
are returningNaN
values inside this library (file used: 7386755164.zip).1 - I noticed that in the npm distributed package (v1.9.0) the following file
node_modules\fit-file-parser\dist\binary.js
has an error. Indeed inside functionreadData
the following line:Should be
getUnt8
function doesn't exists, thegetUint8
yes !2 - Aside this, the
readData
(dist folder) from repository is not the same than the npm package. Why? I was unable to find tag 1.9.0 on this repository.Thanks for your help !
Thomas
The text was updated successfully, but these errors were encountered: