-
Notifications
You must be signed in to change notification settings - Fork 12
Description
First of all, thanks for a great lib. Most things are working great but found an issue.
The issue
I'm importing a structured workout .fit file where a workout step has target_type: "heart_rate" and a "custom_target_value_low"=240 & custom_target_value_high="260".
When viewing the file through https://www.fitfileviewer.com/ it shows these fields.

In the README.md of this project it recommends FIT File Explorer, and when using that tool it also shows these fields, but named custom_target_heart_rate_high, which actually might be more correct when looking at documentation (https://developer.garmin.com/fit/file-types/workout/#targettype).

But when using this lib, FitFileParser, they are not included. Instead there's a target_hr_zone with a value of 0.

Steps to reproduce
- Create a new swift project
- Write the following code:
if let fit = FitFile(file: selectedFile) {
let steps = fit.messages(forMessageType: .workout_step)
for step in steps {
print(step.interpretedFieldKeys())
}
}- Use the attached .fit file and run
- Notice the output is:
["target_hr_zone", "duration_time", "intensity", "message_index_value", "target_type", "duration_type", "wkt_step_name", "message_index"]
["message_index_value", "duration_type", "intensity", "message_index"]
Expected to happen
The output should include the custom_target_value_low/custom_target_heart_rate_low and custom_target_value_high/custom_target_heart_rate_high fields.