Hello David, hello all contributors & users !
I am trying to create my own activity streams graphics, and I am facing some issues to catch the data from the fit file (as it seems from my different attempts)
If you have some ideas/solutions/tips this would be greatly helpful !
I also give the bike computer type : Wahoo elemnt (in case someone found the right names/formats)
Blockquote
{
let alt = icu.streams.altitude
let dist = icu.streams.distance
let cad = icu.streams.cadence
let vit = icu.streams.Speed
let temp = icu.streams.Temperature
let grade = icu.streams.Grade
let kg = activity.icu_weight+16
// for (let m of icu.fit) {
// data.setAt(m.timestamp.value, m.Speed?.value)
// }
for (let i = 0; i < data.length; i++) data[i] = vit[i]
}
in my for loop i would compute some values based on the different one from the streams. Here is just a test to display each of the streams and see which one is blocking and find a solution :
- altitude, distance and cadence are perfectly displayed
- but speed, temperature, grade seems to be NULL (TypeError: Cannot read property “0” from null)
I tried different names for the streams (speed, Speed, spd etc… ) but this is worst as it doesn’t recognize the stream => the error is : Invalid stream type [speed]. So only the spelling here above displayed seems to be found in the fit file… but still data are empty…
in fitfile viewer, we can see the data are present :
on runanalyze, same, I can see the raw data as below :
I tried to replace : “icu.streams” by “icu.fit”, => same results
As you may see in the lines in comments, i tried building the data array with the other way, but not working neither. losing my mind, I tried many different ways (in case of chance), but no…
- for (let m of icu.fit.record) TypeError: Cannot read property “record” from null
- for (let m of icu.fit) TypeError: Cannot read property “Symbol(Symbol.iterator)” from null
- _for (let m of icu.record)_TypeError: Cannot read property “Symbol(Symbol.iterator)” from null
Hope you could help me a bit here !
Thank you in advance for your answers !
Best regards,
Pask