+
Skip to content

All values are default values in new fields added with fitgen #76

@jsliacan

Description

@jsliacan

I'm not sure if this is an issue, but I need help figuring out why all values from radar_current, radar_speeds, etc. fields that I added with fitgen default to max uint8 or uint16 as I define them. The values from other fields are parsed correctly (e.g. HR or distance). I apologize in advance if this is a user error!

Let's focus on radar_current (which is the current count of cars coming up from behind registered by Garmin radar). See the file displayed below. The last entry is 20.

image

I defined radar_current as uint8. See SDK's Profile.xlxs screenshot:

Screenshot from 2023-01-26 12-09-25

Once I regenerate a few files with fitgen and I tell go about it with replace github.com/tormoder/fit => /home/jsliacan/Github/fit in go.mod, I run a modified example code from here:

for _, record := range activity.Records {
where I extract the last entry in the radar_current field in the record (snippet below). I expected to see 20 but I get 255. However, for hr field (which I didn't generate with fitgen) I get the correct value of 114.

var numCars, hr int
for _, record := range activity.Records {
    numCars = int(record.RadarCurrent)
    hr = int(record.HeartRate)
}
fmt.Println(hr, numCars)

Any help appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载