diff --git a/Sources/FitFileParser/rzfit_swift_map.swift b/Sources/FitFileParser/rzfit_swift_map.swift index 6358f74..56e6bd3 100644 --- a/Sources/FitFileParser/rzfit_swift_map.swift +++ b/Sources/FitFileParser/rzfit_swift_map.swift @@ -3,7 +3,7 @@ import FitFileParserObjc extension FitFile { - public static let sdkVersion = "21.105" + public static let sdkVersion = "21.115" } //MARK: - Module Entry Point Functions @@ -438,6 +438,13 @@ func rzfit_swift_build_mesg(mesg_num : FIT_MESG_NUM, uptr : UnsafePointer mesg_enums: rzfit_swift_string_dict_for_developer_data_id(ptr: $0), mesg_dates: rzfit_swift_date_dict_for_developer_data_id(ptr: $0)) } + case 211: // monitoring_hr_data + uptr.withMemoryRebound(to: FIT_MONITORING_HR_DATA_MESG.self, capacity: 1) { + rv = FitMessage( mesg_num: 211, + mesg_values: rzfit_swift_value_dict_for_monitoring_hr_data(ptr: $0), + mesg_enums: rzfit_swift_string_dict_for_monitoring_hr_data(ptr: $0), + mesg_dates: rzfit_swift_date_dict_for_monitoring_hr_data(ptr: $0)) + } case 225: // set uptr.withMemoryRebound(to: FIT_SET_MESG.self, capacity: 1) { rv = FitMessage( mesg_num: 225, @@ -512,6 +519,7 @@ func rzfit_swift_known_units( ) -> [String] { "Breaths/min", "kGrit", "Flow", + "mS", "strokes/min", "m/s,m", "Pa", @@ -521,6 +529,7 @@ func rzfit_swift_known_units( ) -> [String] { "L/min", "V", "calories", + "min", "deg/s", "g", "mG", @@ -531,13 +540,15 @@ func rzfit_swift_known_units( ) -> [String] { "% or bpm", "% or watts", "kcal/day", + "kg/m^2", "mmHg", "m/cycle", "kcal/cycle", "kcal / day", "100 * m", "2 * cycles (steps)", - "min", + "mL/kg/min", + "breaths/min", "bar", "L", ] @@ -616,7 +627,14 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri case "ccr_high_setpoint": return "percent" case "ccr_high_setpoint_depth": return "m" case "depth": return "m" - case "time": return "s" + case "time": + switch mesg_num { + case 262: return "s" // dive_alarm + case 393: return "s" // dive_apnea_alarm + case 78: return "s" // hrv + case 290: return "ms" // beat_intervals + default: return nil + } case "speed": switch mesg_num { case 262: return "mps" // dive_alarm @@ -657,6 +675,8 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri case "normalized_power": return "watts" case "training_stress_score": return "tss" case "intensity_factor": return "if" + case "end_position_lat": return "semicircles" + case "end_position_long": return "semicircles" case "avg_stroke_count": return "strokes/lap" case "avg_stroke_distance": return "m" case "swim_stroke": return "swim_stroke" @@ -741,13 +761,15 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri case "total_flow": return "Flow" case "avg_grit": return "kGrit" case "avg_flow": return "Flow" + case "avg_spo2": return "percent" + case "avg_stress": return "percent" + case "sdrr_hrv": return "mS" + case "rmssd_hrv": return "mS" case "total_fractional_ascent": return "m" case "total_fractional_descent": return "m" case "avg_core_temperature": return "C" case "min_core_temperature": return "C" case "max_core_temperature": return "C" - case "end_position_lat": return "semicircles" - case "end_position_long": return "semicircles" case "avg_swimming_cadence": return "strokes/min" case "position_lat": return "semicircles" case "position_long": return "semicircles" @@ -797,6 +819,7 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri case "vertical_ratio": return "percent" case "stance_time_balance": return "percent" case "step_length": return "mm" + case "cycle_length16": return "m" case "absolute_pressure": return "Pa" case "next_stop_depth": return "m" case "next_stop_time": return "s" @@ -804,7 +827,12 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri case "ndl_time": return "s" case "cns_load": return "percent" case "n2_load": return "percent" - case "respiration_rate": return "s" + case "respiration_rate": + switch mesg_num { + case 20: return "s" // record + case 297: return "breaths/min" // respiration_rate + default: return nil + } case "enhanced_respiration_rate": return "Breaths/min" case "ebike_travel_range": return "km" case "ebike_battery_level": return "percent" @@ -835,6 +863,9 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri case "time_duration_alert": return "s" case "distance_duration_alert": return "m" case "calorie_duration_alert": return "calories" + case "auto_activity_detect_duration": return "min" + case "start_timestamp": return "s" + case "auto_activity_detect_start_timestamp": return "s" case "radar_threat_avg_approach_speed": return "m/s" case "radar_threat_max_approach_speed": return "m/s" case "cum_operating_time": return "s" @@ -936,6 +967,7 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri case "basal_met": return "kcal/day" case "active_met": return "kcal/day" case "metabolic_age": return "years" + case "bmi": return "kg/m^2" case "systolic_pressure": return "mmHg" case "diastolic_pressure": return "mmHg" case "mean_arterial_pressure": return "mmHg" @@ -961,11 +993,14 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri case "descent": return "m" case "moderate_activity_minutes": return "minutes" case "vigorous_activity_minutes": return "minutes" + case "current_day_resting_heart_rate": return "bpm" + case "reading_spo2": return "percent" case "time256": return "s" case "filtered_bpm": return "bpm" case "event_timestamp": return "s" case "event_timestamp_12": return "s" case "stress_level_time": return "s" + case "vo2_max": return "mL/kg/min" case "bottom_time": return "s" case "avg_pressure_sac": return "bar/min" case "avg_volume_sac": return "L/min" @@ -976,6 +1011,13 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri case "avg_descent_rate": return "m/s" case "max_ascent_rate": return "m/s" case "max_descent_rate": return "m/s" + case "weekly_average": return "ms" + case "last_night_average": return "ms" + case "last_night_5_min_high": return "ms" + case "baseline_low_upper": return "ms" + case "baseline_balanced_lower": return "ms" + case "baseline_balanced_upper": return "ms" + case "value": return "ms" case "pressure": return "bar" case "start_pressure": return "bar" case "end_pressure": return "bar" @@ -1108,55 +1150,61 @@ func rzfit_swift_string_for_type(fit_type : FIT_UINT8, val : FIT_UINT32 ) -> Str case 121: return rzfit_swift_string_from_bike_light_beam_angle_mode( FIT_UINT8(val) ) case 122: return rzfit_swift_string_from_fit_base_unit( FIT_UINT16(val) ) case 123: return rzfit_swift_string_from_set_type( FIT_UINT8(val) ) - case 124: return rzfit_swift_string_from_exercise_category( FIT_UINT16(val) ) - case 125: return rzfit_swift_string_from_bench_press_exercise_name( FIT_UINT16(val) ) - case 126: return rzfit_swift_string_from_calf_raise_exercise_name( FIT_UINT16(val) ) - case 127: return rzfit_swift_string_from_cardio_exercise_name( FIT_UINT16(val) ) - case 128: return rzfit_swift_string_from_carry_exercise_name( FIT_UINT16(val) ) - case 129: return rzfit_swift_string_from_chop_exercise_name( FIT_UINT16(val) ) - case 130: return rzfit_swift_string_from_core_exercise_name( FIT_UINT16(val) ) - case 131: return rzfit_swift_string_from_crunch_exercise_name( FIT_UINT16(val) ) - case 132: return rzfit_swift_string_from_curl_exercise_name( FIT_UINT16(val) ) - case 133: return rzfit_swift_string_from_deadlift_exercise_name( FIT_UINT16(val) ) - case 134: return rzfit_swift_string_from_flye_exercise_name( FIT_UINT16(val) ) - case 135: return rzfit_swift_string_from_hip_raise_exercise_name( FIT_UINT16(val) ) - case 136: return rzfit_swift_string_from_hip_stability_exercise_name( FIT_UINT16(val) ) - case 137: return rzfit_swift_string_from_hip_swing_exercise_name( FIT_UINT16(val) ) - case 138: return rzfit_swift_string_from_hyperextension_exercise_name( FIT_UINT16(val) ) - case 139: return rzfit_swift_string_from_lateral_raise_exercise_name( FIT_UINT16(val) ) - case 140: return rzfit_swift_string_from_leg_curl_exercise_name( FIT_UINT16(val) ) - case 141: return rzfit_swift_string_from_leg_raise_exercise_name( FIT_UINT16(val) ) - case 142: return rzfit_swift_string_from_lunge_exercise_name( FIT_UINT16(val) ) - case 143: return rzfit_swift_string_from_olympic_lift_exercise_name( FIT_UINT16(val) ) - case 144: return rzfit_swift_string_from_plank_exercise_name( FIT_UINT16(val) ) - case 145: return rzfit_swift_string_from_plyo_exercise_name( FIT_UINT16(val) ) - case 146: return rzfit_swift_string_from_pull_up_exercise_name( FIT_UINT16(val) ) - case 147: return rzfit_swift_string_from_push_up_exercise_name( FIT_UINT16(val) ) - case 148: return rzfit_swift_string_from_row_exercise_name( FIT_UINT16(val) ) - case 149: return rzfit_swift_string_from_shoulder_press_exercise_name( FIT_UINT16(val) ) - case 150: return rzfit_swift_string_from_shoulder_stability_exercise_name( FIT_UINT16(val) ) - case 151: return rzfit_swift_string_from_shrug_exercise_name( FIT_UINT16(val) ) - case 152: return rzfit_swift_string_from_sit_up_exercise_name( FIT_UINT16(val) ) - case 153: return rzfit_swift_string_from_squat_exercise_name( FIT_UINT16(val) ) - case 154: return rzfit_swift_string_from_total_body_exercise_name( FIT_UINT16(val) ) - case 155: return rzfit_swift_string_from_triceps_extension_exercise_name( FIT_UINT16(val) ) - case 156: return rzfit_swift_string_from_warm_up_exercise_name( FIT_UINT16(val) ) - case 157: return rzfit_swift_string_from_run_exercise_name( FIT_UINT16(val) ) - case 158: return rzfit_swift_string_from_water_type( FIT_ENUM(val) ) - case 159: return rzfit_swift_string_from_tissue_model_type( FIT_ENUM(val) ) - case 160: return rzfit_swift_string_from_dive_gas_status( FIT_ENUM(val) ) - case 161: return rzfit_swift_string_from_dive_alert( FIT_ENUM(val) ) - case 162: return rzfit_swift_string_from_dive_alarm_type( FIT_ENUM(val) ) - case 163: return rzfit_swift_string_from_dive_backlight_mode( FIT_ENUM(val) ) - case 164: return rzfit_swift_string_from_ccr_setpoint_switch_mode( FIT_ENUM(val) ) - case 165: return rzfit_swift_string_from_dive_gas_mode( FIT_ENUM(val) ) - case 166: return rzfit_swift_string_from_favero_product( FIT_UINT16(val) ) - case 167: return rzfit_swift_string_from_split_type( FIT_ENUM(val) ) - case 168: return rzfit_swift_string_from_climb_pro_event( FIT_ENUM(val) ) - case 169: return rzfit_swift_string_from_gas_consumption_rate_type( FIT_ENUM(val) ) - case 170: return rzfit_swift_string_from_tap_sensitivity( FIT_ENUM(val) ) - case 171: return rzfit_swift_string_from_radar_threat_level_type( FIT_ENUM(val) ) - case 172: return rzfit_swift_string_from_no_fly_time_mode( FIT_ENUM(val) ) + case 124: return rzfit_swift_string_from_max_met_category( FIT_ENUM(val) ) + case 125: return rzfit_swift_string_from_exercise_category( FIT_UINT16(val) ) + case 126: return rzfit_swift_string_from_bench_press_exercise_name( FIT_UINT16(val) ) + case 127: return rzfit_swift_string_from_calf_raise_exercise_name( FIT_UINT16(val) ) + case 128: return rzfit_swift_string_from_cardio_exercise_name( FIT_UINT16(val) ) + case 129: return rzfit_swift_string_from_carry_exercise_name( FIT_UINT16(val) ) + case 130: return rzfit_swift_string_from_chop_exercise_name( FIT_UINT16(val) ) + case 131: return rzfit_swift_string_from_core_exercise_name( FIT_UINT16(val) ) + case 132: return rzfit_swift_string_from_crunch_exercise_name( FIT_UINT16(val) ) + case 133: return rzfit_swift_string_from_curl_exercise_name( FIT_UINT16(val) ) + case 134: return rzfit_swift_string_from_deadlift_exercise_name( FIT_UINT16(val) ) + case 135: return rzfit_swift_string_from_flye_exercise_name( FIT_UINT16(val) ) + case 136: return rzfit_swift_string_from_hip_raise_exercise_name( FIT_UINT16(val) ) + case 137: return rzfit_swift_string_from_hip_stability_exercise_name( FIT_UINT16(val) ) + case 138: return rzfit_swift_string_from_hip_swing_exercise_name( FIT_UINT16(val) ) + case 139: return rzfit_swift_string_from_hyperextension_exercise_name( FIT_UINT16(val) ) + case 140: return rzfit_swift_string_from_lateral_raise_exercise_name( FIT_UINT16(val) ) + case 141: return rzfit_swift_string_from_leg_curl_exercise_name( FIT_UINT16(val) ) + case 142: return rzfit_swift_string_from_leg_raise_exercise_name( FIT_UINT16(val) ) + case 143: return rzfit_swift_string_from_lunge_exercise_name( FIT_UINT16(val) ) + case 144: return rzfit_swift_string_from_olympic_lift_exercise_name( FIT_UINT16(val) ) + case 145: return rzfit_swift_string_from_plank_exercise_name( FIT_UINT16(val) ) + case 146: return rzfit_swift_string_from_plyo_exercise_name( FIT_UINT16(val) ) + case 147: return rzfit_swift_string_from_pull_up_exercise_name( FIT_UINT16(val) ) + case 148: return rzfit_swift_string_from_push_up_exercise_name( FIT_UINT16(val) ) + case 149: return rzfit_swift_string_from_row_exercise_name( FIT_UINT16(val) ) + case 150: return rzfit_swift_string_from_shoulder_press_exercise_name( FIT_UINT16(val) ) + case 151: return rzfit_swift_string_from_shoulder_stability_exercise_name( FIT_UINT16(val) ) + case 152: return rzfit_swift_string_from_shrug_exercise_name( FIT_UINT16(val) ) + case 153: return rzfit_swift_string_from_sit_up_exercise_name( FIT_UINT16(val) ) + case 154: return rzfit_swift_string_from_squat_exercise_name( FIT_UINT16(val) ) + case 155: return rzfit_swift_string_from_total_body_exercise_name( FIT_UINT16(val) ) + case 156: return rzfit_swift_string_from_triceps_extension_exercise_name( FIT_UINT16(val) ) + case 157: return rzfit_swift_string_from_warm_up_exercise_name( FIT_UINT16(val) ) + case 158: return rzfit_swift_string_from_run_exercise_name( FIT_UINT16(val) ) + case 159: return rzfit_swift_string_from_water_type( FIT_ENUM(val) ) + case 160: return rzfit_swift_string_from_tissue_model_type( FIT_ENUM(val) ) + case 161: return rzfit_swift_string_from_dive_gas_status( FIT_ENUM(val) ) + case 162: return rzfit_swift_string_from_dive_alert( FIT_ENUM(val) ) + case 163: return rzfit_swift_string_from_dive_alarm_type( FIT_ENUM(val) ) + case 164: return rzfit_swift_string_from_dive_backlight_mode( FIT_ENUM(val) ) + case 165: return rzfit_swift_string_from_sleep_level( FIT_ENUM(val) ) + case 166: return rzfit_swift_string_from_spo2_measurement_type( FIT_ENUM(val) ) + case 167: return rzfit_swift_string_from_ccr_setpoint_switch_mode( FIT_ENUM(val) ) + case 168: return rzfit_swift_string_from_dive_gas_mode( FIT_ENUM(val) ) + case 169: return rzfit_swift_string_from_favero_product( FIT_UINT16(val) ) + case 170: return rzfit_swift_string_from_split_type( FIT_ENUM(val) ) + case 171: return rzfit_swift_string_from_climb_pro_event( FIT_ENUM(val) ) + case 172: return rzfit_swift_string_from_gas_consumption_rate_type( FIT_ENUM(val) ) + case 173: return rzfit_swift_string_from_tap_sensitivity( FIT_ENUM(val) ) + case 174: return rzfit_swift_string_from_radar_threat_level_type( FIT_ENUM(val) ) + case 175: return rzfit_swift_string_from_max_met_speed_source( FIT_ENUM(val) ) + case 176: return rzfit_swift_string_from_max_met_heart_rate_source( FIT_ENUM(val) ) + case 177: return rzfit_swift_string_from_hrv_status( FIT_ENUM(val) ) + case 178: return rzfit_swift_string_from_no_fly_time_mode( FIT_ENUM(val) ) default: return "fit_type_\(fit_type)_\(val)" } } @@ -1242,19 +1290,28 @@ public func rzfit_swift_string_to_mesg_num(_ input : String) -> FIT_UINT16 case "magnetometer_data": return 208; case "barometer_data": return 209; case "one_d_sensor_calibration": return 210; + case "monitoring_hr_data": return 211; case "time_in_zone": return 216; case "set": return 225; case "stress_level": return 227; + case "max_met_data": return 229; case "dive_settings": return 258; case "dive_gas": return 259; case "dive_alarm": return 262; case "exercise_title": return 264; case "dive_summary": return 268; + case "spo2_data": return 269; + case "sleep_level": return 275; case "jump": return 285; + case "beat_intervals": return 290; + case "respiration_rate": return 297; case "split": return 312; case "climb_pro": return 317; case "tank_update": return 319; case "tank_summary": return 323; + case "sleep_assessment": return 346; + case "hrv_status_summary": return 370; + case "hrv_value": return 371; case "device_aux_battery_info": return 375; case "dive_apnea_alarm": return 393; case "mfg_range_min": return 0xFF00; @@ -1345,19 +1402,28 @@ public func rzfit_swift_string_from_mesg_num(_ input : FIT_UINT16) -> String case 208: return "magnetometer_data" case 209: return "barometer_data" case 210: return "one_d_sensor_calibration" + case 211: return "monitoring_hr_data" case 216: return "time_in_zone" case 225: return "set" case 227: return "stress_level" + case 229: return "max_met_data" case 258: return "dive_settings" case 259: return "dive_gas" case 262: return "dive_alarm" case 264: return "exercise_title" case 268: return "dive_summary" + case 269: return "spo2_data" + case 275: return "sleep_level" case 285: return "jump" + case 290: return "beat_intervals" + case 297: return "respiration_rate" case 312: return "split" case 317: return "climb_pro" case 319: return "tank_update" case 323: return "tank_summary" + case 346: return "sleep_assessment" + case 370: return "hrv_status_summary" + case 371: return "hrv_value" case 375: return "device_aux_battery_info" case 393: return "dive_apnea_alarm" case 0xFF00: return "mfg_range_min" @@ -1451,19 +1517,28 @@ public extension FitMessageType { static let magnetometer_data : FitMessageType = 208 static let barometer_data : FitMessageType = 209 static let one_d_sensor_calibration : FitMessageType = 210 + static let monitoring_hr_data : FitMessageType = 211 static let time_in_zone : FitMessageType = 216 static let set : FitMessageType = 225 static let stress_level : FitMessageType = 227 + static let max_met_data : FitMessageType = 229 static let dive_settings : FitMessageType = 258 static let dive_gas : FitMessageType = 259 static let dive_alarm : FitMessageType = 262 static let exercise_title : FitMessageType = 264 static let dive_summary : FitMessageType = 268 + static let spo2_data : FitMessageType = 269 + static let sleep_level : FitMessageType = 275 static let jump : FitMessageType = 285 + static let beat_intervals : FitMessageType = 290 + static let respiration_rate : FitMessageType = 297 static let split : FitMessageType = 312 static let climb_pro : FitMessageType = 317 static let tank_update : FitMessageType = 319 static let tank_summary : FitMessageType = 323 + static let sleep_assessment : FitMessageType = 346 + static let hrv_status_summary : FitMessageType = 370 + static let hrv_value : FitMessageType = 371 static let device_aux_battery_info : FitMessageType = 375 static let dive_apnea_alarm : FitMessageType = 393 static let mfg_range_min : FitMessageType = 0xFF00 @@ -2128,6 +2203,16 @@ fileprivate func rzfit_swift_string_from_sub_sport(_ input : FIT_ENUM) -> String case 75: return "tabata" case 84: return "pickleball" case 85: return "padel" + case 110: return "fly_canopy" + case 111: return "fly_paraglide" + case 112: return "fly_paramotor" + case 113: return "fly_pressurized" + case 114: return "fly_navigate" + case 115: return "fly_timer" + case 116: return "fly_altimeter" + case 117: return "fly_wx" + case 118: return "fly_vfr" + case 119: return "fly_ifr" case 254: return "all" default: return "sub_sport_\(input)" } @@ -2296,6 +2381,7 @@ fileprivate func rzfit_swift_string_from_event(_ input : FIT_ENUM) -> String case 45: return "elev_high_alert" case 46: return "elev_low_alert" case 47: return "comm_timeout" + case 54: return "auto_activity_detect" case 56: return "dive_alert" case 57: return "dive_gas_switched" case 71: return "tank_pressure_reserve" @@ -2710,6 +2796,9 @@ fileprivate func rzfit_swift_string_from_manufacturer(_ input : FIT_UINT16) -> S case 143: return "keiser_fitness" case 144: return "zwift_byte" case 145: return "porsche_ep" + case 146: return "blackbird" + case 147: return "meilan_byte" + case 148: return "ezon" case 255: return "development" case 257: return "healthandlife" case 258: return "lezyne" @@ -2777,6 +2866,8 @@ fileprivate func rzfit_swift_string_from_manufacturer(_ input : FIT_UINT16) -> S case 320: return "lsec" case 321: return "lululemon_studio" case 322: return "shanyue" + case 323: return "spinning_mda" + case 324: return "hilldating" case 5759: return "actigraphcorp" default: return "manufacturer_\(input)" } @@ -3036,6 +3127,7 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) -> case 3134: return "fenix5s_plus_apac" case 3135: return "fenix5x_plus_apac" case 3142: return "edge_520_plus_apac" + case 3143: return "descent_t1" case 3144: return "fr235l_asia" case 3145: return "fr245_asia" case 3163: return "vivo_active3m_apac" @@ -3123,6 +3215,7 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) -> case 3843: return "edge_1040" case 3850: return "marq_golfer_asia" case 3851: return "venu2_plus" + case 3865: return "gnss" case 3869: return "fr55" case 3888: return "instinct_2" case 3905: return "fenix7s" @@ -3152,6 +3245,8 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) -> case 4017: return "venu2_plus_asia" case 4024: return "fr955" case 4033: return "fr55_asia" + case 4061: return "edge_540" + case 4062: return "edge_840" case 4063: return "vivosmart_5" case 4071: return "instinct_2_asia" case 4105: return "marq_gen2" @@ -3164,6 +3259,9 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) -> case 4135: return "tactix7" case 4155: return "instinct_crossover" case 4169: return "edge_explore2" + case 4233: return "approach_s70" + case 4257: return "fr265_large" + case 4258: return "fr265_small" case 4265: return "tacx_neo_smart" case 4266: return "tacx_neo2_smart" case 4267: return "tacx_neo2_t_smart" @@ -3177,7 +3275,14 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) -> case 4275: return "tacx_flux2_smart" case 4276: return "tacx_magnum" case 4305: return "edge_1040_asia" + case 4312: return "epix_gen2_pro_42" + case 4313: return "epix_gen2_pro_47" + case 4314: return "epix_gen2_pro_51" + case 4315: return "fr965" case 4341: return "enduro2" + case 4375: return "fenix7_pro_solar" + case 4394: return "instinct_2x" + case 4442: return "descent_t2" case 10007: return "sdm4" case 10014: return "edge_remote" case 20533: return "tacx_training_app_win" @@ -4394,6 +4499,15 @@ fileprivate func rzfit_swift_string_from_set_type(_ input : FIT_UINT8) -> String } } +fileprivate func rzfit_swift_string_from_max_met_category(_ input : FIT_ENUM) -> String +{ + switch input { + case 0: return "generic" + case 1: return "cycling" + default: return "max_met_category_\(input)" + } +} + fileprivate func rzfit_swift_string_from_exercise_category(_ input : FIT_UINT16) -> String { switch input { @@ -5999,6 +6113,29 @@ fileprivate func rzfit_swift_string_from_dive_backlight_mode(_ input : FIT_ENUM) } } +fileprivate func rzfit_swift_string_from_sleep_level(_ input : FIT_ENUM) -> String +{ + switch input { + case 0: return "unmeasurable" + case 1: return "awake" + case 2: return "light" + case 3: return "deep" + case 4: return "rem" + default: return "sleep_level_\(input)" + } +} + +fileprivate func rzfit_swift_string_from_spo2_measurement_type(_ input : FIT_ENUM) -> String +{ + switch input { + case 0: return "off_wrist" + case 1: return "spot_check" + case 2: return "continuous_check" + case 3: return "periodic" + default: return "spo2_measurement_type_\(input)" + } +} + fileprivate func rzfit_swift_string_from_ccr_setpoint_switch_mode(_ input : FIT_ENUM) -> String { switch input { @@ -6095,6 +6232,37 @@ fileprivate func rzfit_swift_string_from_radar_threat_level_type(_ input : FIT_E } } +fileprivate func rzfit_swift_string_from_max_met_speed_source(_ input : FIT_ENUM) -> String +{ + switch input { + case 0: return "onboard_gps" + case 1: return "connected_gps" + case 2: return "cadence" + default: return "max_met_speed_source_\(input)" + } +} + +fileprivate func rzfit_swift_string_from_max_met_heart_rate_source(_ input : FIT_ENUM) -> String +{ + switch input { + case 0: return "whr" + case 1: return "hrm" + default: return "max_met_heart_rate_source_\(input)" + } +} + +fileprivate func rzfit_swift_string_from_hrv_status(_ input : FIT_ENUM) -> String +{ + switch input { + case 0: return "none" + case 1: return "poor" + case 2: return "low" + case 3: return "unbalanced" + case 4: return "balanced" + default: return "hrv_status_\(input)" + } +} + fileprivate func rzfit_swift_string_from_no_fly_time_mode(_ input : FIT_ENUM) -> String { switch input { @@ -6662,6 +6830,8 @@ fileprivate func rzfit_swift_field_num_to_string_for_session( field_num : FIT_UI case 35: return "training_stress_score" case 36: return "intensity_factor" case 37: return "left_right_balance" + case 38: return "end_position_lat" + case 39: return "end_position_long" case 41: return "avg_stroke_count" case 42: return "avg_stroke_distance" case 43: return "swim_stroke" @@ -6717,6 +6887,7 @@ fileprivate func rzfit_swift_field_num_to_string_for_session( field_num : FIT_UI case 103: return "avg_left_pedal_smoothness" case 104: return "avg_right_pedal_smoothness" case 105: return "avg_combined_pedal_smoothness" + case 110: return "sport_profile_name" case 111: return "sport_index" case 112: return "time_standing" case 113: return "stand_count" @@ -6765,6 +6936,10 @@ fileprivate func rzfit_swift_field_num_to_string_for_session( field_num : FIT_UI case 183: return "jump_count" case 186: return "avg_grit" case 187: return "avg_flow" + case 194: return "avg_spo2" + case 195: return "avg_stress" + case 197: return "sdrr_hrv" + case 198: return "rmssd_hrv" case 199: return "total_fractional_ascent" case 200: return "total_fractional_descent" case 208: return "avg_core_temperature" @@ -7014,6 +7189,7 @@ fileprivate func rzfit_swift_field_num_to_string_for_record( field_num : FIT_UIN case 83: return "vertical_ratio" case 84: return "stance_time_balance" case 85: return "step_length" + case 87: return "cycle_length16" case 91: return "absolute_pressure" case 92: return "depth" case 93: return "next_stop_depth" @@ -7026,6 +7202,7 @@ fileprivate func rzfit_swift_field_num_to_string_for_record( field_num : FIT_UIN case 108: return "enhanced_respiration_rate" case 114: return "grit" case 115: return "flow" + case 116: return "current_stress" case 117: return "ebike_travel_range" case 118: return "ebike_battery_level" case 119: return "ebike_assist_mode" @@ -7091,6 +7268,8 @@ fileprivate func rzfit_swift_field_num_to_string_for_event( field_num : FIT_UINT return "comm_timeout" }else if strings["event"] == "dive_alert" { return "dive_alert" + }else if strings["event"] == "auto_activity_detect" { + return "auto_activity_detect_duration" }else if strings["event"] == "radar_threat_alert" { return "radar_threat_alert" }else{ @@ -7104,6 +7283,13 @@ fileprivate func rzfit_swift_field_num_to_string_for_event( field_num : FIT_UINT case 11: return "rear_gear_num" case 12: return "rear_gear" case 13: return "device_index" + case 14: return "activity_type" + case 15: + if strings["event"] == "auto_activity_detect" { + return "auto_activity_detect_start_timestamp" + }else{ + return "start_timestamp" + } case 21: return "radar_threat_level_max" case 22: return "radar_threat_count" case 23: return "radar_threat_avg_approach_speed" @@ -7684,6 +7870,7 @@ fileprivate func rzfit_swift_field_num_to_string_for_segment_file( field_num : F } fileprivate func rzfit_swift_field_num_to_string_for_workout( field_num : FIT_UINT16 ) -> String { switch field_num { + case 254: return "message_index" case 4: return "sport" case 5: return "capabilities" case 6: return "num_valid_steps" @@ -7917,6 +8104,7 @@ fileprivate func rzfit_swift_field_num_to_string_for_weight_scale( field_num : F case 10: return "metabolic_age" case 11: return "visceral_fat_rating" case 12: return "user_profile_index" + case 13: return "bmi" default: return "weight_scale_field_num_\(field_num)" } } @@ -7992,6 +8180,23 @@ fileprivate func rzfit_swift_field_num_to_string_for_monitoring( field_num : FIT default: return "monitoring_field_num_\(field_num)" } } +fileprivate func rzfit_swift_field_num_to_string_for_monitoring_hr_data( field_num : FIT_UINT16 ) -> String { + switch field_num { + case 253: return "timestamp" + case 0: return "resting_heart_rate" + case 1: return "current_day_resting_heart_rate" + default: return "monitoring_hr_data_field_num_\(field_num)" + } +} +fileprivate func rzfit_swift_field_num_to_string_for_spo2_data( field_num : FIT_UINT16 ) -> String { + switch field_num { + case 253: return "timestamp" + case 0: return "reading_spo2" + case 1: return "reading_confidence" + case 2: return "mode" + default: return "spo2_data_field_num_\(field_num)" + } +} fileprivate func rzfit_swift_field_num_to_string_for_hr( field_num : FIT_UINT16 ) -> String { switch field_num { case 253: return "timestamp" @@ -8010,6 +8215,19 @@ fileprivate func rzfit_swift_field_num_to_string_for_stress_level( field_num : F default: return "stress_level_field_num_\(field_num)" } } +fileprivate func rzfit_swift_field_num_to_string_for_max_met_data( field_num : FIT_UINT16 ) -> String { + switch field_num { + case 0: return "update_time" + case 2: return "vo2_max" + case 5: return "sport" + case 6: return "sub_sport" + case 8: return "max_met_category" + case 9: return "calibrated_data" + case 12: return "hr_source" + case 13: return "speed_source" + default: return "max_met_data_field_num_\(field_num)" + } +} fileprivate func rzfit_swift_field_num_to_string_for_memo_glob( field_num : FIT_UINT16 ) -> String { switch field_num { case 250: return "part_index" @@ -8021,6 +8239,13 @@ fileprivate func rzfit_swift_field_num_to_string_for_memo_glob( field_num : FIT_ default: return "memo_glob_field_num_\(field_num)" } } +fileprivate func rzfit_swift_field_num_to_string_for_sleep_level( field_num : FIT_UINT16 ) -> String { + switch field_num { + case 253: return "timestamp" + case 0: return "sleep_level" + default: return "sleep_level_field_num_\(field_num)" + } +} fileprivate func rzfit_swift_field_num_to_string_for_ant_channel_id( field_num : FIT_UINT16 ) -> String { switch field_num { case 0: return "channel_number" @@ -8123,6 +8348,41 @@ fileprivate func rzfit_swift_field_num_to_string_for_hrv( field_num : FIT_UINT16 default: return "hrv_field_num_\(field_num)" } } +fileprivate func rzfit_swift_field_num_to_string_for_beat_intervals( field_num : FIT_UINT16 ) -> String { + switch field_num { + case 253: return "timestamp" + case 0: return "timestamp_ms" + case 1: return "time" + default: return "beat_intervals_field_num_\(field_num)" + } +} +fileprivate func rzfit_swift_field_num_to_string_for_hrv_status_summary( field_num : FIT_UINT16 ) -> String { + switch field_num { + case 253: return "timestamp" + case 0: return "weekly_average" + case 1: return "last_night_average" + case 2: return "last_night_5_min_high" + case 3: return "baseline_low_upper" + case 4: return "baseline_balanced_lower" + case 5: return "baseline_balanced_upper" + case 6: return "status" + default: return "hrv_status_summary_field_num_\(field_num)" + } +} +fileprivate func rzfit_swift_field_num_to_string_for_hrv_value( field_num : FIT_UINT16 ) -> String { + switch field_num { + case 253: return "timestamp" + case 0: return "value" + default: return "hrv_value_field_num_\(field_num)" + } +} +fileprivate func rzfit_swift_field_num_to_string_for_respiration_rate( field_num : FIT_UINT16 ) -> String { + switch field_num { + case 253: return "timestamp" + case 0: return "respiration_rate" + default: return "respiration_rate_field_num_\(field_num)" + } +} fileprivate func rzfit_swift_field_num_to_string_for_tank_update( field_num : FIT_UINT16 ) -> String { switch field_num { case 253: return "timestamp" @@ -8141,6 +8401,25 @@ fileprivate func rzfit_swift_field_num_to_string_for_tank_summary( field_num : F default: return "tank_summary_field_num_\(field_num)" } } +fileprivate func rzfit_swift_field_num_to_string_for_sleep_assessment( field_num : FIT_UINT16 ) -> String { + switch field_num { + case 0: return "combined_awake_score" + case 1: return "awake_time_score" + case 2: return "awakenings_count_score" + case 3: return "deep_sleep_score" + case 4: return "sleep_duration_score" + case 5: return "light_sleep_score" + case 6: return "overall_sleep_score" + case 7: return "sleep_quality_score" + case 8: return "sleep_recovery_score" + case 9: return "rem_sleep_score" + case 10: return "sleep_restlessness_score" + case 11: return "awakenings_count" + case 14: return "interruptions_score" + case 15: return "average_stress_during_sleep" + default: return "sleep_assessment_field_num_\(field_num)" + } +} func rzfit_swift_field_num_to_string( mesg_num : FIT_UINT16, field_num : FIT_UINT16, strings : [String:String]) -> String { switch mesg_num { case 0: return rzfit_swift_field_num_to_string_for_file_id(field_num: field_num, strings: strings) @@ -8221,19 +8500,28 @@ func rzfit_swift_field_num_to_string( mesg_num : FIT_UINT16, field_num : FIT_UIN case 208: return rzfit_swift_field_num_to_string_for_magnetometer_data(field_num: field_num) case 209: return rzfit_swift_field_num_to_string_for_barometer_data(field_num: field_num) case 210: return rzfit_swift_field_num_to_string_for_one_d_sensor_calibration(field_num: field_num, strings: strings) + case 211: return rzfit_swift_field_num_to_string_for_monitoring_hr_data(field_num: field_num) case 216: return rzfit_swift_field_num_to_string_for_time_in_zone(field_num: field_num) case 225: return rzfit_swift_field_num_to_string_for_set(field_num: field_num) case 227: return rzfit_swift_field_num_to_string_for_stress_level(field_num: field_num) + case 229: return rzfit_swift_field_num_to_string_for_max_met_data(field_num: field_num) case 258: return rzfit_swift_field_num_to_string_for_dive_settings(field_num: field_num, strings: strings) case 259: return rzfit_swift_field_num_to_string_for_dive_gas(field_num: field_num) case 262: return rzfit_swift_field_num_to_string_for_dive_alarm(field_num: field_num) case 264: return rzfit_swift_field_num_to_string_for_exercise_title(field_num: field_num) case 268: return rzfit_swift_field_num_to_string_for_dive_summary(field_num: field_num) + case 269: return rzfit_swift_field_num_to_string_for_spo2_data(field_num: field_num) + case 275: return rzfit_swift_field_num_to_string_for_sleep_level(field_num: field_num) case 285: return rzfit_swift_field_num_to_string_for_jump(field_num: field_num) + case 290: return rzfit_swift_field_num_to_string_for_beat_intervals(field_num: field_num) + case 297: return rzfit_swift_field_num_to_string_for_respiration_rate(field_num: field_num) case 312: return rzfit_swift_field_num_to_string_for_split(field_num: field_num) case 317: return rzfit_swift_field_num_to_string_for_climb_pro(field_num: field_num) case 319: return rzfit_swift_field_num_to_string_for_tank_update(field_num: field_num) case 323: return rzfit_swift_field_num_to_string_for_tank_summary(field_num: field_num) + case 346: return rzfit_swift_field_num_to_string_for_sleep_assessment(field_num: field_num) + case 370: return rzfit_swift_field_num_to_string_for_hrv_status_summary(field_num: field_num) + case 371: return rzfit_swift_field_num_to_string_for_hrv_value(field_num: field_num) case 375: return rzfit_swift_field_num_to_string_for_device_aux_battery_info(field_num: field_num) case 393: return rzfit_swift_field_num_to_string_for_dive_apnea_alarm(field_num: field_num) default: return "mesg_num_\(mesg_num)_field_num_\(field_num)" @@ -9396,6 +9684,14 @@ fileprivate func rzfit_swift_value_dict_for_session( ptr : UnsafePointer) -> [String:String] { var rv : [String:String] = [:] var x : FIT_SESSION_MESG = ptr.pointee + let sport_profile_name = withUnsafeBytes(of: &x.sport_profile_name) { (rawPtr) -> String in + let ptr = rawPtr.baseAddress!.assumingMemoryBound(to: CChar.self) + return String(cString: ptr) + } + if !sport_profile_name.isEmpty { + rv[ "sport_profile_name" ] = sport_profile_name + } if( x.message_index != FIT_UINT16_INVALID ) { rv[ "message_index" ] = rzfit_swift_string_from_message_index(x.message_index) } @@ -10515,6 +10818,9 @@ fileprivate func rzfit_swift_value_dict_for_event( ptr : UnsafePointer> bits rv[name] = Double(val) / Double(scale) } + }else if x.event == 54 { // auto_activity_detect + let val : Double = Double(x.data) + rv[ "auto_activity_detect_duration" ] = val }else if x.event == 75 { // radar_threat_alert var sourceData : UInt32 = UInt32(x.data) for info in [ (8, "radar_threat_level_max", 1), (8, "radar_threat_count", 1), (8, "radar_threat_avg_approach_speed", 10), (8, "radar_threat_max_approach_speed", 10) ] { @@ -11755,6 +12061,9 @@ fileprivate func rzfit_swift_date_dict_for_segment_file( ptr : UnsafePointer) -> [String:Double] { var rv : [String:Double] = [:] let x : FIT_WORKOUT_MESG = ptr.pointee + if x.message_index != FIT_UINT16_INVALID { + rv[ "message_index_value" ] = rzfit_swift_value_from_message_index(x.message_index) + } if x.num_valid_steps != FIT_UINT16_INVALID { let val : Double = Double(x.num_valid_steps) rv[ "num_valid_steps" ] = val @@ -11778,6 +12087,9 @@ fileprivate func rzfit_swift_string_dict_for_workout( ptr : UnsafePointer) -> [String:Double] { + var rv : [String:Double] = [:] + let x : FIT_MONITORING_HR_DATA_MESG = ptr.pointee + if x.resting_heart_rate != FIT_UINT8_INVALID { + let val : Double = Double(x.resting_heart_rate) + rv[ "resting_heart_rate" ] = val + } + if x.current_day_resting_heart_rate != FIT_UINT8_INVALID { + let val : Double = Double(x.current_day_resting_heart_rate) + rv[ "current_day_resting_heart_rate" ] = val + } + return rv +} +fileprivate func rzfit_swift_string_dict_for_monitoring_hr_data( ptr : UnsafePointer) -> [String:String] { + return [:] +} +fileprivate func rzfit_swift_date_dict_for_monitoring_hr_data( ptr : UnsafePointer) -> [String:Date] { + var rv : [String:Date] = [:] + let x : FIT_MONITORING_HR_DATA_MESG = ptr.pointee + if x.timestamp != FIT_UINT32_INVALID { + let val : Date = Date(timeIntervalSinceReferenceDate: Double(x.timestamp)-347241600.0 ) + rv[ "timestamp" ] = val + } + return rv +} fileprivate func rzfit_swift_value_dict_for_hr( ptr : UnsafePointer) -> [String:Double] { var rv : [String:Double] = [:] let x : FIT_HR_MESG = ptr.pointee diff --git a/Sources/FitFileParser/rzfit_swift_reverse_map.swift b/Sources/FitFileParser/rzfit_swift_reverse_map.swift index f13b6ac..0683356 100644 --- a/Sources/FitFileParser/rzfit_swift_reverse_map.swift +++ b/Sources/FitFileParser/rzfit_swift_reverse_map.swift @@ -166,12 +166,16 @@ public func rzfit_swift_reverse_value(mesg: String, field: String, value: String return rzfit_swift_reverse_value_barometer_data(field: field, value: value ) case "one_d_sensor_calibration": // 210 return rzfit_swift_reverse_value_one_d_sensor_calibration(field: field, value: value ) + case "monitoring_hr_data": // 211 + return rzfit_swift_reverse_value_monitoring_hr_data(field: field, value: value ) case "time_in_zone": // 216 return rzfit_swift_reverse_value_time_in_zone(field: field, value: value ) case "set": // 225 return rzfit_swift_reverse_value_set(field: field, value: value ) case "stress_level": // 227 return rzfit_swift_reverse_value_stress_level(field: field, value: value ) + case "max_met_data": // 229 + return rzfit_swift_reverse_value_max_met_data(field: field, value: value ) case "dive_settings": // 258 return rzfit_swift_reverse_value_dive_settings(field: field, value: value ) case "dive_gas": // 259 @@ -182,8 +186,16 @@ public func rzfit_swift_reverse_value(mesg: String, field: String, value: String return rzfit_swift_reverse_value_exercise_title(field: field, value: value ) case "dive_summary": // 268 return rzfit_swift_reverse_value_dive_summary(field: field, value: value ) + case "spo2_data": // 269 + return rzfit_swift_reverse_value_spo2_data(field: field, value: value ) + case "sleep_level": // 275 + return rzfit_swift_reverse_value_sleep_level(field: field, value: value ) case "jump": // 285 return rzfit_swift_reverse_value_jump(field: field, value: value ) + case "beat_intervals": // 290 + return rzfit_swift_reverse_value_beat_intervals(field: field, value: value ) + case "respiration_rate": // 297 + return rzfit_swift_reverse_value_respiration_rate(field: field, value: value ) case "split": // 312 return rzfit_swift_reverse_value_split(field: field, value: value ) case "climb_pro": // 317 @@ -192,6 +204,12 @@ public func rzfit_swift_reverse_value(mesg: String, field: String, value: String return rzfit_swift_reverse_value_tank_update(field: field, value: value ) case "tank_summary": // 323 return rzfit_swift_reverse_value_tank_summary(field: field, value: value ) + case "sleep_assessment": // 346 + return rzfit_swift_reverse_value_sleep_assessment(field: field, value: value ) + case "hrv_status_summary": // 370 + return rzfit_swift_reverse_value_hrv_status_summary(field: field, value: value ) + case "hrv_value": // 371 + return rzfit_swift_reverse_value_hrv_value(field: field, value: value ) case "device_aux_battery_info": // 375 return rzfit_swift_reverse_value_device_aux_battery_info(field: field, value: value ) case "dive_apnea_alarm": // 393 @@ -1303,6 +1321,12 @@ fileprivate func rzfit_swift_reverse_value_session(field: String, value: String) return .value(dbl) case "left_right_balance": // left_right_balance_100 return rzfit_swift_reverse_value_left_right_balance_100(value: value) + case "end_position_lat": // sint32 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "end_position_long": // sint32 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) case "avg_stroke_count": // uint32 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) @@ -1466,6 +1490,9 @@ fileprivate func rzfit_swift_reverse_value_session(field: String, value: String) case "avg_combined_pedal_smoothness": // uint8 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) + case "sport_profile_name": // string + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) case "sport_index": // uint8 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) @@ -1610,6 +1637,18 @@ fileprivate func rzfit_swift_reverse_value_session(field: String, value: String) case "avg_flow": // float32 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) + case "avg_spo2": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "avg_stress": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "sdrr_hrv": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "rmssd_hrv": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) case "total_fractional_ascent": // uint8 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) @@ -2253,6 +2292,9 @@ fileprivate func rzfit_swift_reverse_value_record(field: String, value: String) case "step_length": // uint16 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) + case "cycle_length16": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) case "absolute_pressure": // uint32 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) @@ -2289,6 +2331,9 @@ fileprivate func rzfit_swift_reverse_value_record(field: String, value: String) case "flow": // float32 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) + case "current_stress": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) case "ebike_travel_range": // uint16 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) @@ -2399,6 +2444,9 @@ fileprivate func rzfit_swift_reverse_value_event(field: String, value: String) - return rzfit_swift_reverse_value_comm_timeout_type(value: value) case "dive_alert": // dive_alert return rzfit_swift_reverse_value_dive_alert(value: value) + case "auto_activity_detect_duration": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) case "radar_threat_alert": // uint32 guard let dbl : Double = Double(value) else { return .unknown } return .value(dbl) @@ -2425,6 +2473,16 @@ fileprivate func rzfit_swift_reverse_value_event(field: String, value: String) - return .value(dbl) case "device_index": // device_index return rzfit_swift_reverse_value_device_index(value: value) + case "activity_type": // activity_type + return rzfit_swift_reverse_value_activity_type(value: value) + case "start_timestamp": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) + case "auto_activity_detect_start_timestamp": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) case "radar_threat_level_max": // radar_threat_level_type return rzfit_swift_reverse_value_radar_threat_level_type(value: value) case "radar_threat_count": // uint8 @@ -3692,6 +3750,8 @@ fileprivate func rzfit_swift_reverse_value_segment_file(field: String, value: St } fileprivate func rzfit_swift_reverse_value_workout(field: String, value: String) -> RzFitSwiftValue { switch field { + case "message_index": // message_index + return rzfit_swift_reverse_value_message_index(value: value) case "sport": // sport return rzfit_swift_reverse_value_sport(value: value) case "capabilities": // workout_capabilities @@ -4014,6 +4074,9 @@ fileprivate func rzfit_swift_reverse_value_weight_scale(field: String, value: St return .value(dbl) case "user_profile_index": // message_index return rzfit_swift_reverse_value_message_index(value: value) + case "bmi": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) default: return .unknown } @@ -4173,6 +4236,40 @@ fileprivate func rzfit_swift_reverse_value_monitoring(field: String, value: Stri return .unknown } } +fileprivate func rzfit_swift_reverse_value_monitoring_hr_data(field: String, value: String) -> RzFitSwiftValue { + switch field { + case "timestamp": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) + case "resting_heart_rate": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "current_day_resting_heart_rate": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + default: + return .unknown + } +} +fileprivate func rzfit_swift_reverse_value_spo2_data(field: String, value: String) -> RzFitSwiftValue { + switch field { + case "timestamp": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) + case "reading_spo2": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "reading_confidence": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "mode": // spo2_measurement_type + return rzfit_swift_reverse_value_spo2_measurement_type(value: value) + default: + return .unknown + } +} fileprivate func rzfit_swift_reverse_value_hr(field: String, value: String) -> RzFitSwiftValue { switch field { case "timestamp": // date_time @@ -4211,6 +4308,32 @@ fileprivate func rzfit_swift_reverse_value_stress_level(field: String, value: St return .unknown } } +fileprivate func rzfit_swift_reverse_value_max_met_data(field: String, value: String) -> RzFitSwiftValue { + switch field { + case "update_time": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) + case "vo2_max": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "sport": // sport + return rzfit_swift_reverse_value_sport(value: value) + case "sub_sport": // sub_sport + return rzfit_swift_reverse_value_sub_sport(value: value) + case "max_met_category": // max_met_category + return rzfit_swift_reverse_value_max_met_category(value: value) + case "calibrated_data": // bool + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "hr_source": // max_met_heart_rate_source + return rzfit_swift_reverse_value_max_met_heart_rate_source(value: value) + case "speed_source": // max_met_speed_source + return rzfit_swift_reverse_value_max_met_speed_source(value: value) + default: + return .unknown + } +} fileprivate func rzfit_swift_reverse_value_memo_glob(field: String, value: String) -> RzFitSwiftValue { switch field { case "part_index": // uint32 @@ -4233,6 +4356,18 @@ fileprivate func rzfit_swift_reverse_value_memo_glob(field: String, value: Strin return .unknown } } +fileprivate func rzfit_swift_reverse_value_sleep_level(field: String, value: String) -> RzFitSwiftValue { + switch field { + case "timestamp": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) + case "sleep_level": // sleep_level + return rzfit_swift_reverse_value_sleep_level(value: value) + default: + return .unknown + } +} fileprivate func rzfit_swift_reverse_value_ant_channel_id(field: String, value: String) -> RzFitSwiftValue { switch field { case "channel_number": // uint8 @@ -4462,6 +4597,78 @@ fileprivate func rzfit_swift_reverse_value_hrv(field: String, value: String) -> return .unknown } } +fileprivate func rzfit_swift_reverse_value_beat_intervals(field: String, value: String) -> RzFitSwiftValue { + switch field { + case "timestamp": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) + case "timestamp_ms": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "time": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + default: + return .unknown + } +} +fileprivate func rzfit_swift_reverse_value_hrv_status_summary(field: String, value: String) -> RzFitSwiftValue { + switch field { + case "timestamp": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) + case "weekly_average": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "last_night_average": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "last_night_5_min_high": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "baseline_low_upper": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "baseline_balanced_lower": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "baseline_balanced_upper": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "status": // hrv_status + return rzfit_swift_reverse_value_hrv_status(value: value) + default: + return .unknown + } +} +fileprivate func rzfit_swift_reverse_value_hrv_value(field: String, value: String) -> RzFitSwiftValue { + switch field { + case "timestamp": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) + case "value": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + default: + return .unknown + } +} +fileprivate func rzfit_swift_reverse_value_respiration_rate(field: String, value: String) -> RzFitSwiftValue { + switch field { + case "timestamp": // date_time + guard let dbl : Double = Double(value) else { return .unknown } + let dat : Date = Date(timeIntervalSinceReferenceDate: dbl-347241600.0 ) + return .date(dat) + case "respiration_rate": // sint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + default: + return .unknown + } +} fileprivate func rzfit_swift_reverse_value_tank_update(field: String, value: String) -> RzFitSwiftValue { switch field { case "timestamp": // date_time @@ -4498,6 +4705,54 @@ fileprivate func rzfit_swift_reverse_value_tank_summary(field: String, value: St return .unknown } } +fileprivate func rzfit_swift_reverse_value_sleep_assessment(field: String, value: String) -> RzFitSwiftValue { + switch field { + case "combined_awake_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "awake_time_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "awakenings_count_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "deep_sleep_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "sleep_duration_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "light_sleep_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "overall_sleep_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "sleep_quality_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "sleep_recovery_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "rem_sleep_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "sleep_restlessness_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "awakenings_count": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "interruptions_score": // uint8 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + case "average_stress_during_sleep": // uint16 + guard let dbl : Double = Double(value) else { return .unknown } + return .value(dbl) + default: + return .unknown + } +} fileprivate func rzfit_swift_reverse_value_file(value : String) -> RzFitSwiftValue { switch value { @@ -4706,12 +4961,16 @@ fileprivate func rzfit_swift_reverse_value_mesg_num(value : String) -> RzFitSwif case "barometer_data": return .string("209") case "210": return .string("one_d_sensor_calibration") case "one_d_sensor_calibration": return .string("210") + case "211": return .string("monitoring_hr_data") + case "monitoring_hr_data": return .string("211") case "216": return .string("time_in_zone") case "time_in_zone": return .string("216") case "225": return .string("set") case "set": return .string("225") case "227": return .string("stress_level") case "stress_level": return .string("227") + case "229": return .string("max_met_data") + case "max_met_data": return .string("229") case "258": return .string("dive_settings") case "dive_settings": return .string("258") case "259": return .string("dive_gas") @@ -4722,8 +4981,16 @@ fileprivate func rzfit_swift_reverse_value_mesg_num(value : String) -> RzFitSwif case "exercise_title": return .string("264") case "268": return .string("dive_summary") case "dive_summary": return .string("268") + case "269": return .string("spo2_data") + case "spo2_data": return .string("269") + case "275": return .string("sleep_level") + case "sleep_level": return .string("275") case "285": return .string("jump") case "jump": return .string("285") + case "290": return .string("beat_intervals") + case "beat_intervals": return .string("290") + case "297": return .string("respiration_rate") + case "respiration_rate": return .string("297") case "312": return .string("split") case "split": return .string("312") case "317": return .string("climb_pro") @@ -4732,6 +4999,12 @@ fileprivate func rzfit_swift_reverse_value_mesg_num(value : String) -> RzFitSwif case "tank_update": return .string("319") case "323": return .string("tank_summary") case "tank_summary": return .string("323") + case "346": return .string("sleep_assessment") + case "sleep_assessment": return .string("346") + case "370": return .string("hrv_status_summary") + case "hrv_status_summary": return .string("370") + case "371": return .string("hrv_value") + case "hrv_value": return .string("371") case "375": return .string("device_aux_battery_info") case "device_aux_battery_info": return .string("375") case "393": return .string("dive_apnea_alarm") @@ -5797,6 +6070,26 @@ fileprivate func rzfit_swift_reverse_value_sub_sport(value : String) -> RzFitSwi case "pickleball": return .string("84") case "85": return .string("padel") case "padel": return .string("85") + case "110": return .string("fly_canopy") + case "fly_canopy": return .string("110") + case "111": return .string("fly_paraglide") + case "fly_paraglide": return .string("111") + case "112": return .string("fly_paramotor") + case "fly_paramotor": return .string("112") + case "113": return .string("fly_pressurized") + case "fly_pressurized": return .string("113") + case "114": return .string("fly_navigate") + case "fly_navigate": return .string("114") + case "115": return .string("fly_timer") + case "fly_timer": return .string("115") + case "116": return .string("fly_altimeter") + case "fly_altimeter": return .string("116") + case "117": return .string("fly_wx") + case "fly_wx": return .string("117") + case "118": return .string("fly_vfr") + case "fly_vfr": return .string("118") + case "119": return .string("fly_ifr") + case "fly_ifr": return .string("119") case "254": return .string("all") case "all": return .string("254") default: return .unknown @@ -6056,6 +6349,8 @@ fileprivate func rzfit_swift_reverse_value_event(value : String) -> RzFitSwiftVa case "elev_low_alert": return .string("46") case "47": return .string("comm_timeout") case "comm_timeout": return .string("47") + case "54": return .string("auto_activity_detect") + case "auto_activity_detect": return .string("54") case "56": return .string("dive_alert") case "dive_alert": return .string("56") case "57": return .string("dive_gas_switched") @@ -6772,6 +7067,12 @@ fileprivate func rzfit_swift_reverse_value_manufacturer(value : String) -> RzFit case "zwift_byte": return .string("144") case "145": return .string("porsche_ep") case "porsche_ep": return .string("145") + case "146": return .string("blackbird") + case "blackbird": return .string("146") + case "147": return .string("meilan_byte") + case "meilan_byte": return .string("147") + case "148": return .string("ezon") + case "ezon": return .string("148") case "255": return .string("development") case "development": return .string("255") case "257": return .string("healthandlife") @@ -6906,6 +7207,10 @@ fileprivate func rzfit_swift_reverse_value_manufacturer(value : String) -> RzFit case "lululemon_studio": return .string("321") case "322": return .string("shanyue") case "shanyue": return .string("322") + case "323": return .string("spinning_mda") + case "spinning_mda": return .string("323") + case "324": return .string("hilldating") + case "hilldating": return .string("324") case "5759": return .string("actigraphcorp") case "actigraphcorp": return .string("5759") default: return .unknown @@ -7417,6 +7722,8 @@ fileprivate func rzfit_swift_reverse_value_garmin_product(value : String) -> RzF case "fenix5x_plus_apac": return .string("3135") case "3142": return .string("edge_520_plus_apac") case "edge_520_plus_apac": return .string("3142") + case "3143": return .string("descent_t1") + case "descent_t1": return .string("3143") case "3144": return .string("fr235l_asia") case "fr235l_asia": return .string("3144") case "3145": return .string("fr245_asia") @@ -7591,6 +7898,8 @@ fileprivate func rzfit_swift_reverse_value_garmin_product(value : String) -> RzF case "marq_golfer_asia": return .string("3850") case "3851": return .string("venu2_plus") case "venu2_plus": return .string("3851") + case "3865": return .string("gnss") + case "gnss": return .string("3865") case "3869": return .string("fr55") case "fr55": return .string("3869") case "3888": return .string("instinct_2") @@ -7649,6 +7958,10 @@ fileprivate func rzfit_swift_reverse_value_garmin_product(value : String) -> RzF case "fr955": return .string("4024") case "4033": return .string("fr55_asia") case "fr55_asia": return .string("4033") + case "4061": return .string("edge_540") + case "edge_540": return .string("4061") + case "4062": return .string("edge_840") + case "edge_840": return .string("4062") case "4063": return .string("vivosmart_5") case "vivosmart_5": return .string("4063") case "4071": return .string("instinct_2_asia") @@ -7673,6 +7986,12 @@ fileprivate func rzfit_swift_reverse_value_garmin_product(value : String) -> RzF case "instinct_crossover": return .string("4155") case "4169": return .string("edge_explore2") case "edge_explore2": return .string("4169") + case "4233": return .string("approach_s70") + case "approach_s70": return .string("4233") + case "4257": return .string("fr265_large") + case "fr265_large": return .string("4257") + case "4258": return .string("fr265_small") + case "fr265_small": return .string("4258") case "4265": return .string("tacx_neo_smart") case "tacx_neo_smart": return .string("4265") case "4266": return .string("tacx_neo2_smart") @@ -7699,8 +8018,22 @@ fileprivate func rzfit_swift_reverse_value_garmin_product(value : String) -> RzF case "tacx_magnum": return .string("4276") case "4305": return .string("edge_1040_asia") case "edge_1040_asia": return .string("4305") + case "4312": return .string("epix_gen2_pro_42") + case "epix_gen2_pro_42": return .string("4312") + case "4313": return .string("epix_gen2_pro_47") + case "epix_gen2_pro_47": return .string("4313") + case "4314": return .string("epix_gen2_pro_51") + case "epix_gen2_pro_51": return .string("4314") + case "4315": return .string("fr965") + case "fr965": return .string("4315") case "4341": return .string("enduro2") case "enduro2": return .string("4341") + case "4375": return .string("fenix7_pro_solar") + case "fenix7_pro_solar": return .string("4375") + case "4394": return .string("instinct_2x") + case "instinct_2x": return .string("4394") + case "4442": return .string("descent_t2") + case "descent_t2": return .string("4442") case "10007": return .string("sdm4") case "sdm4": return .string("10007") case "10014": return .string("edge_remote") @@ -9649,6 +9982,17 @@ fileprivate func rzfit_swift_reverse_value_set_type(value : String) -> RzFitSwif } } +fileprivate func rzfit_swift_reverse_value_max_met_category(value : String) -> RzFitSwiftValue +{ + switch value { + case "0": return .string("generic") + case "generic": return .string("0") + case "1": return .string("cycling") + case "cycling": return .string("1") + default: return .unknown + } +} + fileprivate func rzfit_swift_reverse_value_exercise_category(value : String) -> RzFitSwiftValue { switch value { @@ -12579,6 +12923,38 @@ fileprivate func rzfit_swift_reverse_value_dive_backlight_mode(value : String) - } } +fileprivate func rzfit_swift_reverse_value_sleep_level(value : String) -> RzFitSwiftValue +{ + switch value { + case "0": return .string("unmeasurable") + case "unmeasurable": return .string("0") + case "1": return .string("awake") + case "awake": return .string("1") + case "2": return .string("light") + case "light": return .string("2") + case "3": return .string("deep") + case "deep": return .string("3") + case "4": return .string("rem") + case "rem": return .string("4") + default: return .unknown + } +} + +fileprivate func rzfit_swift_reverse_value_spo2_measurement_type(value : String) -> RzFitSwiftValue +{ + switch value { + case "0": return .string("off_wrist") + case "off_wrist": return .string("0") + case "1": return .string("spot_check") + case "spot_check": return .string("1") + case "2": return .string("continuous_check") + case "continuous_check": return .string("2") + case "3": return .string("periodic") + case "periodic": return .string("3") + default: return .unknown + } +} + fileprivate func rzfit_swift_reverse_value_ccr_setpoint_switch_mode(value : String) -> RzFitSwiftValue { switch value { @@ -12715,6 +13091,47 @@ fileprivate func rzfit_swift_reverse_value_radar_threat_level_type(value : Strin } } +fileprivate func rzfit_swift_reverse_value_max_met_speed_source(value : String) -> RzFitSwiftValue +{ + switch value { + case "0": return .string("onboard_gps") + case "onboard_gps": return .string("0") + case "1": return .string("connected_gps") + case "connected_gps": return .string("1") + case "2": return .string("cadence") + case "cadence": return .string("2") + default: return .unknown + } +} + +fileprivate func rzfit_swift_reverse_value_max_met_heart_rate_source(value : String) -> RzFitSwiftValue +{ + switch value { + case "0": return .string("whr") + case "whr": return .string("0") + case "1": return .string("hrm") + case "hrm": return .string("1") + default: return .unknown + } +} + +fileprivate func rzfit_swift_reverse_value_hrv_status(value : String) -> RzFitSwiftValue +{ + switch value { + case "0": return .string("none") + case "none": return .string("0") + case "1": return .string("poor") + case "poor": return .string("1") + case "2": return .string("low") + case "low": return .string("2") + case "3": return .string("unbalanced") + case "unbalanced": return .string("3") + case "4": return .string("balanced") + case "balanced": return .string("4") + default: return .unknown + } +} + fileprivate func rzfit_swift_reverse_value_no_fly_time_mode(value : String) -> RzFitSwiftValue { switch value { diff --git a/Sources/FitFileParserObjc/fit.h b/Sources/FitFileParserObjc/fit.h index 1dcd45f..63b5970 100644 --- a/Sources/FitFileParserObjc/fit.h +++ b/Sources/FitFileParserObjc/fit.h @@ -10,8 +10,8 @@ // Copyright 2021 Garmin Canada Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. -// Profile Version = 21.105Release -// Tag = production/release/21.105.00-0-gdc65d24 +// Profile Version = 21.115Release +// Tag = production/release/21.115.00-0-gfe0a7f8 // Product = EXAMPLE // Alignment = 4 bytes, padding disabled. //////////////////////////////////////////////////////////////////////////////// @@ -60,7 +60,7 @@ #define FIT_PROTOCOL_VERSION_MAX FIT_PROTOCOL_VERSION_20 #define FIT_PROFILE_VERSION_MAJOR 21 - #define FIT_PROFILE_VERSION_MINOR 105 + #define FIT_PROFILE_VERSION_MINOR 115 #define FIT_PROFILE_VERSION_SCALE 100 #define FIT_PROFILE_VERSION ((FIT_UINT16) (FIT_PROFILE_VERSION_MAJOR * 100 + FIT_PROFILE_VERSION_MINOR)) #endif // !defined(FIT_CPP_INCLUDE_C) diff --git a/Sources/FitFileParserObjc/fit.m b/Sources/FitFileParserObjc/fit.m index 215d72a..c61fc6f 100644 --- a/Sources/FitFileParserObjc/fit.m +++ b/Sources/FitFileParserObjc/fit.m @@ -10,8 +10,8 @@ // Copyright 2021 Garmin Canada Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. -// Profile Version = 21.105Release -// Tag = production/release/21.105.00-0-gdc65d24 +// Profile Version = 21.115Release +// Tag = production/release/21.115.00-0-gfe0a7f8 // Product = EXAMPLE // Alignment = 4 bytes, padding disabled. //////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/FitFileParserObjc/fit_convert.h b/Sources/FitFileParserObjc/fit_convert.h index 7e28e0b..c56baf8 100644 --- a/Sources/FitFileParserObjc/fit_convert.h +++ b/Sources/FitFileParserObjc/fit_convert.h @@ -10,8 +10,8 @@ // Copyright 2021 Garmin Canada Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. -// Profile Version = 21.105Release -// Tag = production/release/21.105.00-0-gdc65d24 +// Profile Version = 21.115Release +// Tag = production/release/21.115.00-0-gfe0a7f8 // Product = EXAMPLE // Alignment = 4 bytes, padding disabled. //////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/FitFileParserObjc/fit_convert.m b/Sources/FitFileParserObjc/fit_convert.m index 8965957..dc34017 100644 --- a/Sources/FitFileParserObjc/fit_convert.m +++ b/Sources/FitFileParserObjc/fit_convert.m @@ -10,8 +10,8 @@ // Copyright 2021 Garmin Canada Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. -// Profile Version = 21.105Release -// Tag = production/release/21.105.00-0-gdc65d24 +// Profile Version = 21.115Release +// Tag = production/release/21.115.00-0-gfe0a7f8 // Product = EXAMPLE // Alignment = 4 bytes, padding disabled. //////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/FitFileParserObjc/fit_crc.h b/Sources/FitFileParserObjc/fit_crc.h index 81feee7..e52ae53 100644 --- a/Sources/FitFileParserObjc/fit_crc.h +++ b/Sources/FitFileParserObjc/fit_crc.h @@ -10,8 +10,8 @@ // Copyright 2021 Garmin Canada Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. -// Profile Version = 21.105Release -// Tag = production/release/21.105.00-0-gdc65d24 +// Profile Version = 21.115Release +// Tag = production/release/21.115.00-0-gfe0a7f8 // Product = EXAMPLE // Alignment = 4 bytes, padding disabled. //////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/FitFileParserObjc/fit_crc.m b/Sources/FitFileParserObjc/fit_crc.m index f291c1b..883b49e 100644 --- a/Sources/FitFileParserObjc/fit_crc.m +++ b/Sources/FitFileParserObjc/fit_crc.m @@ -10,8 +10,8 @@ // Copyright 2021 Garmin Canada Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. -// Profile Version = 21.105Release -// Tag = production/release/21.105.00-0-gdc65d24 +// Profile Version = 21.115Release +// Tag = production/release/21.115.00-0-gfe0a7f8 // Product = EXAMPLE // Alignment = 4 bytes, padding disabled. //////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/FitFileParserObjc/fit_product.h b/Sources/FitFileParserObjc/fit_product.h index d4e4080..06c3c51 100644 --- a/Sources/FitFileParserObjc/fit_product.h +++ b/Sources/FitFileParserObjc/fit_product.h @@ -10,8 +10,8 @@ // Copyright 2021 Garmin Canada Inc. //////////////////////////////////////////////////////////////////////////////// // ****WARNING**** This file is auto-generated! Do NOT edit this file. -// Profile Version = 21.105Release -// Tag = production/release/21.105.00-0-gdc65d24 +// Profile Version = 21.115Release +// Tag = production/release/21.115.00-0-gfe0a7f8 // Product = EXAMPLE // Alignment = 4 bytes, padding disabled. //////////////////////////////////////////////////////////////////////////////// diff --git a/Sources/FitFileParserObjc/rzfit_objc_map.m b/Sources/FitFileParserObjc/rzfit_objc_map.m index d14e35f..67ec71a 100644 --- a/Sources/FitFileParserObjc/rzfit_objc_map.m +++ b/Sources/FitFileParserObjc/rzfit_objc_map.m @@ -656,6 +656,16 @@ case 75: return @"tabata"; case 84: return @"pickleball"; case 85: return @"padel"; + case 110: return @"fly_canopy"; + case 111: return @"fly_paraglide"; + case 112: return @"fly_paramotor"; + case 113: return @"fly_pressurized"; + case 114: return @"fly_navigate"; + case 115: return @"fly_timer"; + case 116: return @"fly_altimeter"; + case 117: return @"fly_wx"; + case 118: return @"fly_vfr"; + case 119: return @"fly_ifr"; case 254: return @"all"; default: return [NSString stringWithFormat:@"sub_sport_%u", (unsigned int)sub_sport]; } @@ -824,6 +834,7 @@ case 45: return @"elev_high_alert"; case 46: return @"elev_low_alert"; case 47: return @"comm_timeout"; + case 54: return @"auto_activity_detect"; case 56: return @"dive_alert"; case 57: return @"dive_gas_switched"; case 71: return @"tank_pressure_reserve"; @@ -1238,6 +1249,9 @@ case 143: return @"keiser_fitness"; case 144: return @"zwift_byte"; case 145: return @"porsche_ep"; + case 146: return @"blackbird"; + case 147: return @"meilan_byte"; + case 148: return @"ezon"; case 255: return @"development"; case 257: return @"healthandlife"; case 258: return @"lezyne"; @@ -1305,6 +1319,8 @@ case 320: return @"lsec"; case 321: return @"lululemon_studio"; case 322: return @"shanyue"; + case 323: return @"spinning_mda"; + case 324: return @"hilldating"; case 5759: return @"actigraphcorp"; default: return [NSString stringWithFormat:@"manufacturer_%u", (unsigned int)manufacturer]; } @@ -1564,6 +1580,7 @@ case 3134: return @"fenix5s_plus_apac"; case 3135: return @"fenix5x_plus_apac"; case 3142: return @"edge_520_plus_apac"; + case 3143: return @"descent_t1"; case 3144: return @"fr235l_asia"; case 3145: return @"fr245_asia"; case 3163: return @"vivo_active3m_apac"; @@ -1651,6 +1668,7 @@ case 3843: return @"edge_1040"; case 3850: return @"marq_golfer_asia"; case 3851: return @"venu2_plus"; + case 3865: return @"gnss"; case 3869: return @"fr55"; case 3888: return @"instinct_2"; case 3905: return @"fenix7s"; @@ -1680,6 +1698,8 @@ case 4017: return @"venu2_plus_asia"; case 4024: return @"fr955"; case 4033: return @"fr55_asia"; + case 4061: return @"edge_540"; + case 4062: return @"edge_840"; case 4063: return @"vivosmart_5"; case 4071: return @"instinct_2_asia"; case 4105: return @"marq_gen2"; @@ -1692,6 +1712,9 @@ case 4135: return @"tactix7"; case 4155: return @"instinct_crossover"; case 4169: return @"edge_explore2"; + case 4233: return @"approach_s70"; + case 4257: return @"fr265_large"; + case 4258: return @"fr265_small"; case 4265: return @"tacx_neo_smart"; case 4266: return @"tacx_neo2_smart"; case 4267: return @"tacx_neo2_t_smart"; @@ -1705,7 +1728,14 @@ case 4275: return @"tacx_flux2_smart"; case 4276: return @"tacx_magnum"; case 4305: return @"edge_1040_asia"; + case 4312: return @"epix_gen2_pro_42"; + case 4313: return @"epix_gen2_pro_47"; + case 4314: return @"epix_gen2_pro_51"; + case 4315: return @"fr965"; case 4341: return @"enduro2"; + case 4375: return @"fenix7_pro_solar"; + case 4394: return @"instinct_2x"; + case 4442: return @"descent_t2"; case 10007: return @"sdm4"; case 10014: return @"edge_remote"; case 20533: return @"tacx_training_app_win"; @@ -2907,6 +2937,15 @@ } +static NSString * rzfit_objc_string_from_max_met_category( FIT_ENUM max_met_category ){ + switch(max_met_category){ + case 0: return @"generic"; + case 1: return @"cycling"; + default: return [NSString stringWithFormat:@"max_met_category_%u", (unsigned int)max_met_category]; + } +} + + static NSString * rzfit_objc_string_from_exercise_category( FIT_UINT16 exercise_category ){ switch(exercise_category){ case 0: return @"bench_press"; @@ -4512,6 +4551,29 @@ } +static NSString * rzfit_objc_string_from_sleep_level( FIT_ENUM sleep_level ){ + switch(sleep_level){ + case 0: return @"unmeasurable"; + case 1: return @"awake"; + case 2: return @"light"; + case 3: return @"deep"; + case 4: return @"rem"; + default: return [NSString stringWithFormat:@"sleep_level_%u", (unsigned int)sleep_level]; + } +} + + +static NSString * rzfit_objc_string_from_spo2_measurement_type( FIT_ENUM spo2_measurement_type ){ + switch(spo2_measurement_type){ + case 0: return @"off_wrist"; + case 1: return @"spot_check"; + case 2: return @"continuous_check"; + case 3: return @"periodic"; + default: return [NSString stringWithFormat:@"spo2_measurement_type_%u", (unsigned int)spo2_measurement_type]; + } +} + + static NSString * rzfit_objc_string_from_ccr_setpoint_switch_mode( FIT_ENUM ccr_setpoint_switch_mode ){ switch(ccr_setpoint_switch_mode){ case 0: return @"manual"; @@ -4608,6 +4670,37 @@ } +static NSString * rzfit_objc_string_from_max_met_speed_source( FIT_ENUM max_met_speed_source ){ + switch(max_met_speed_source){ + case 0: return @"onboard_gps"; + case 1: return @"connected_gps"; + case 2: return @"cadence"; + default: return [NSString stringWithFormat:@"max_met_speed_source_%u", (unsigned int)max_met_speed_source]; + } +} + + +static NSString * rzfit_objc_string_from_max_met_heart_rate_source( FIT_ENUM max_met_heart_rate_source ){ + switch(max_met_heart_rate_source){ + case 0: return @"whr"; + case 1: return @"hrm"; + default: return [NSString stringWithFormat:@"max_met_heart_rate_source_%u", (unsigned int)max_met_heart_rate_source]; + } +} + + +static NSString * rzfit_objc_string_from_hrv_status( FIT_ENUM hrv_status ){ + switch(hrv_status){ + case 0: return @"none"; + case 1: return @"poor"; + case 2: return @"low"; + case 3: return @"unbalanced"; + case 4: return @"balanced"; + default: return [NSString stringWithFormat:@"hrv_status_%u", (unsigned int)hrv_status]; + } +} + + static NSString * rzfit_objc_string_from_no_fly_time_mode( FIT_ENUM no_fly_time_mode ){ switch(no_fly_time_mode){ case 0: return @"standard"; @@ -4626,7 +4719,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_file_id(FIT_UINT16 field, FIT_IN { FIT_UINT32 manufacturer = fit_interp_string_value(interp, 1); if( manufacturer == 263 ){ // favero_electronics - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 166, .fit_unit = 0, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 169, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 1 ){ // garmin return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 59, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 15 ){ // dynastream @@ -4679,7 +4772,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_slave_device(FIT_UINT16 field, F { FIT_UINT32 manufacturer = fit_interp_string_value(interp, 0); if( manufacturer == 263 ){ // favero_electronics - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 166, .fit_unit = 0, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 169, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 1 ){ // garmin return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 59, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 15 ){ // dynastream @@ -4770,7 +4863,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_device_settings(FIT_UINT16 field case 94: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // number_of_screens case 95: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 97, .fit_unit = 0, .fit_flag = 0 }; // smart_notification_display_orientation case 134: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 22, .fit_unit = 0, .fit_flag = 0 }; // tap_interface - case 174: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 170, .fit_unit = 0, .fit_flag = 0 }; // tap_sensitivity + case 174: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 173, .fit_unit = 0, .fit_flag = 0 }; // tap_sensitivity default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -4996,10 +5089,10 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_dive_settings(FIT_UINT16 field, case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 0, .fit_flag = 1 }; // timestamp case 254: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 8, .fit_unit = 0, .fit_flag = 0 }; // message_index case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // name - case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 159, .fit_unit = 0, .fit_flag = 0 }; // model + case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 160, .fit_unit = 0, .fit_flag = 0 }; // model case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // gf_low case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // gf_high - case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 158, .fit_unit = 0, .fit_flag = 0 }; // water_type + case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 159, .fit_unit = 0, .fit_flag = 0 }; // water_type case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 18, .fit_flag = 0 }; // water_density case 6: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // po2_warn case 7: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // po2_critical @@ -5009,7 +5102,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_dive_settings(FIT_UINT16 field, case 11: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // bottom_time case 12: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // apnea_countdown_enabled case 13: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // apnea_countdown_time - case 14: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 163, .fit_unit = 0, .fit_flag = 0 }; // backlight_mode + case 14: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 164, .fit_unit = 0, .fit_flag = 0 }; // backlight_mode case 15: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // backlight_brightness case 16: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 41, .fit_unit = 0, .fit_flag = 0 }; // backlight_timeout case 17: return (FIT_FIELD_INFO){.scale = 1, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // repeat_dive_interval @@ -5026,17 +5119,17 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_dive_settings(FIT_UINT16 field, return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = FIT_TYPE_PENDING, .fit_unit = 0, .fit_flag = 0 }; } case 21: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 8, .fit_unit = 0, .fit_flag = 0 }; // travel_gas - case 22: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 164, .fit_unit = 0, .fit_flag = 0 }; // ccr_low_setpoint_switch_mode + case 22: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 167, .fit_unit = 0, .fit_flag = 0 }; // ccr_low_setpoint_switch_mode case 23: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // ccr_low_setpoint case 24: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // ccr_low_setpoint_depth - case 25: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 164, .fit_unit = 0, .fit_flag = 0 }; // ccr_high_setpoint_switch_mode + case 25: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 167, .fit_unit = 0, .fit_flag = 0 }; // ccr_high_setpoint_switch_mode case 26: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // ccr_high_setpoint case 27: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // ccr_high_setpoint_depth - case 29: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 169, .fit_unit = 0, .fit_flag = 0 }; // gas_consumption_display + case 29: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 172, .fit_unit = 0, .fit_flag = 0 }; // gas_consumption_display case 30: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // up_key_enabled case 35: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 46, .fit_unit = 0, .fit_flag = 0 }; // dive_sounds case 36: return (FIT_FIELD_INFO){.scale = 10, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // last_stop_multiple - case 37: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 172, .fit_unit = 0, .fit_flag = 0 }; // no_fly_time_mode + case 37: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 178, .fit_unit = 0, .fit_flag = 0 }; // no_fly_time_mode default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -5046,7 +5139,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_dive_alarm(FIT_UINT16 field){ case 0: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // depth case 1: return (FIT_FIELD_INFO){.scale = 1, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // time case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // enabled - case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 162, .fit_unit = 0, .fit_flag = 0 }; // alarm_type + case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 163, .fit_unit = 0, .fit_flag = 0 }; // alarm_type case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 46, .fit_unit = 0, .fit_flag = 0 }; // sound case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 31, .fit_unit = 0, .fit_flag = 0 }; // dive_types case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // id @@ -5064,7 +5157,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_dive_apnea_alarm(FIT_UINT16 fiel case 0: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // depth case 1: return (FIT_FIELD_INFO){.scale = 1, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // time case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // enabled - case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 162, .fit_unit = 0, .fit_flag = 0 }; // alarm_type + case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 163, .fit_unit = 0, .fit_flag = 0 }; // alarm_type case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 46, .fit_unit = 0, .fit_flag = 0 }; // sound case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 31, .fit_unit = 0, .fit_flag = 0 }; // dive_types case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // id @@ -5081,8 +5174,8 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_dive_gas(FIT_UINT16 field){ case 254: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 8, .fit_unit = 0, .fit_flag = 0 }; // message_index case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // helium_content case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // oxygen_content - case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 160, .fit_unit = 0, .fit_flag = 0 }; // status - case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 165, .fit_unit = 0, .fit_flag = 0 }; // mode + case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 161, .fit_unit = 0, .fit_flag = 0 }; // status + case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 168, .fit_unit = 0, .fit_flag = 0 }; // mode default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -5189,6 +5282,8 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_session(FIT_UINT16 field, FIT_IN case 35: return (FIT_FIELD_INFO){.scale = 10, .offset = 0, .fit_type = 0, .fit_unit = 27, .fit_flag = 0 }; // training_stress_score case 36: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 28, .fit_flag = 0 }; // intensity_factor case 37: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 77, .fit_unit = 0, .fit_flag = 0 }; // left_right_balance + case 38: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 20, .fit_flag = 0 }; // end_position_lat + case 39: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 20, .fit_flag = 0 }; // end_position_long case 41: return (FIT_FIELD_INFO){.scale = 10, .offset = 0, .fit_type = 0, .fit_unit = 29, .fit_flag = 0 }; // avg_stroke_count case 42: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // avg_stroke_distance case 43: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 71, .fit_unit = 30, .fit_flag = 0 }; // swim_stroke @@ -5244,6 +5339,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_session(FIT_UINT16 field, FIT_IN case 103: return (FIT_FIELD_INFO){.scale = 2, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // avg_left_pedal_smoothness case 104: return (FIT_FIELD_INFO){.scale = 2, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // avg_right_pedal_smoothness case 105: return (FIT_FIELD_INFO){.scale = 2, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // avg_combined_pedal_smoothness + case 110: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // sport_profile_name case 111: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // sport_index case 112: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // time_standing case 113: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // stand_count @@ -5292,6 +5388,10 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_session(FIT_UINT16 field, FIT_IN case 183: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // jump_count case 186: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 38, .fit_flag = 0 }; // avg_grit case 187: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 39, .fit_flag = 0 }; // avg_flow + case 194: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // avg_spo2 + case 195: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // avg_stress + case 197: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 40, .fit_flag = 0 }; // sdrr_hrv + case 198: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 40, .fit_flag = 0 }; // rmssd_hrv case 199: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // total_fractional_ascent case 200: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // total_fractional_descent case 208: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 32, .fit_flag = 0 }; // avg_core_temperature @@ -5471,7 +5571,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_length(FIT_UINT16 field){ case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 23, .fit_flag = 0 }; // total_strokes case 6: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; // avg_speed case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 71, .fit_unit = 30, .fit_flag = 0 }; // swim_stroke - case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 40, .fit_flag = 0 }; // avg_swimming_cadence + case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 41, .fit_flag = 0 }; // avg_swimming_cadence case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // event_group case 11: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 24, .fit_flag = 0 }; // total_calories case 12: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 78, .fit_unit = 0, .fit_flag = 0 }; // length_type @@ -5497,7 +5597,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_record(FIT_UINT16 field){ case 5: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // distance case 6: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; // speed case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 15, .fit_flag = 0 }; // power - case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 41, .fit_flag = 0 }; // compressed_speed_distance + case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 42, .fit_flag = 0 }; // compressed_speed_distance case 9: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 11, .fit_flag = 0 }; // grade case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // resistance case 11: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // time_from_course @@ -5547,7 +5647,8 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_record(FIT_UINT16 field){ case 83: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // vertical_ratio case 84: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // stance_time_balance case 85: return (FIT_FIELD_INFO){.scale = 10, .offset = 0, .fit_type = 0, .fit_unit = 12, .fit_flag = 0 }; // step_length - case 91: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 42, .fit_flag = 0 }; // absolute_pressure + case 87: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // cycle_length16 + case 91: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 43, .fit_flag = 0 }; // absolute_pressure case 92: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // depth case 93: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // next_stop_depth case 94: return (FIT_FIELD_INFO){.scale = 1, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // next_stop_time @@ -5559,14 +5660,15 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_record(FIT_UINT16 field){ case 108: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 37, .fit_flag = 0 }; // enhanced_respiration_rate case 114: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // grit case 115: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // flow - case 117: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 43, .fit_flag = 0 }; // ebike_travel_range + case 116: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // current_stress + case 117: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 44, .fit_flag = 0 }; // ebike_travel_range case 118: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // ebike_battery_level - case 119: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 44, .fit_flag = 0 }; // ebike_assist_mode + case 119: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 45, .fit_flag = 0 }; // ebike_assist_mode case 120: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // ebike_assist_level_percent case 123: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // air_time_remaining - case 124: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 45, .fit_flag = 0 }; // pressure_sac - case 125: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 46, .fit_flag = 0 }; // volume_sac - case 126: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 46, .fit_flag = 0 }; // rmv + case 124: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 46, .fit_flag = 0 }; // pressure_sac + case 125: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 47, .fit_flag = 0 }; // volume_sac + case 126: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 47, .fit_flag = 0 }; // rmv case 127: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; // ascent_rate case 129: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // po2 case 139: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 32, .fit_flag = 0 }; // core_temperature @@ -5587,7 +5689,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_event(FIT_UINT16 field, FIT_INTE }else if( event == 10 ){ // course_point return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 8, .fit_unit = 0, .fit_flag = 0 }; }else if( event == 11 ){ // battery - return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 47, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 48, .fit_flag = 0 }; }else if( event == 12 ){ // virtual_partner_pace return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; }else if( event == 13 ){ // hr_high_alert @@ -5611,7 +5713,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_event(FIT_UINT16 field, FIT_INTE }else if( event == 24 ){ // distance_duration_alert return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; }else if( event == 25 ){ // calorie_duration_alert - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 48, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 49, .fit_flag = 0 }; }else if( event == 27 ){ // fitness_equipment return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 45, .fit_unit = 0, .fit_flag = 0 }; }else if( event == 33 ){ // sport_point @@ -5625,7 +5727,9 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_event(FIT_UINT16 field, FIT_INTE }else if( event == 47 ){ // comm_timeout return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 107, .fit_unit = 0, .fit_flag = 0 }; }else if( event == 56 ){ // dive_alert - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 161, .fit_unit = 0, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 162, .fit_unit = 0, .fit_flag = 0 }; + }else if( event == 54 ){ // auto_activity_detect + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 50, .fit_flag = 0 }; }else if( event == 75 ){ // radar_threat_alert return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } @@ -5639,7 +5743,16 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_event(FIT_UINT16 field, FIT_INTE case 11: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // rear_gear_num case 12: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // rear_gear case 13: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 9, .fit_unit = 0, .fit_flag = 0 }; // device_index - case 21: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 171, .fit_unit = 0, .fit_flag = 0 }; // radar_threat_level_max + case 14: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 72, .fit_unit = 0, .fit_flag = 0 }; // activity_type + case 15: // start_timestamp + { + FIT_UINT32 event = fit_interp_string_value(interp, 0); + if( event == 54 ){ // auto_activity_detect + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; + } + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = FIT_TYPE_PENDING, .fit_unit = 0, .fit_flag = 0 }; + } + case 21: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 174, .fit_unit = 0, .fit_flag = 0 }; // radar_threat_level_max case 22: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // radar_threat_count case 23: return (FIT_FIELD_INFO){.scale = 10, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; // radar_threat_avg_approach_speed case 24: return (FIT_FIELD_INFO){.scale = 10, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; // radar_threat_max_approach_speed @@ -5670,7 +5783,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_device_info(FIT_UINT16 field, FI { FIT_UINT32 manufacturer = fit_interp_string_value(interp, 2); if( manufacturer == 263 ){ // favero_electronics - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 166, .fit_unit = 0, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 169, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 1 ){ // garmin return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 59, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 15 ){ // dynastream @@ -5685,7 +5798,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_device_info(FIT_UINT16 field, FI case 5: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // software_version case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // hardware_version case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // cum_operating_time - case 10: return (FIT_FIELD_INFO){.scale = 256, .offset = 0, .fit_type = 0, .fit_unit = 47, .fit_flag = 0 }; // battery_voltage + case 10: return (FIT_FIELD_INFO){.scale = 256, .offset = 0, .fit_type = 0, .fit_unit = 48, .fit_flag = 0 }; // battery_voltage case 11: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 63, .fit_unit = 0, .fit_flag = 0 }; // battery_status case 18: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 88, .fit_unit = 0, .fit_flag = 0 }; // sensor_position case 19: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // descriptor @@ -5702,7 +5815,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_device_aux_battery_info(FIT_UINT switch( field ){ case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 0, .fit_flag = 1 }; // timestamp case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 9, .fit_unit = 0, .fit_flag = 0 }; // device_index - case 1: return (FIT_FIELD_INFO){.scale = 256, .offset = 0, .fit_type = 0, .fit_unit = 47, .fit_flag = 0 }; // battery_voltage + case 1: return (FIT_FIELD_INFO){.scale = 256, .offset = 0, .fit_type = 0, .fit_unit = 48, .fit_flag = 0 }; // battery_voltage case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 63, .fit_unit = 0, .fit_flag = 0 }; // battery_status case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // battery_identifier default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; @@ -5717,7 +5830,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_training_file(FIT_UINT16 field, { FIT_UINT32 manufacturer = fit_interp_string_value(interp, 1); if( manufacturer == 263 ){ // favero_electronics - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 166, .fit_unit = 0, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 169, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 1 ){ // garmin return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 59, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 15 ){ // dynastream @@ -5798,9 +5911,9 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_gyroscope_data(FIT_UINT16 field) case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 33, .fit_flag = 0 }; // gyro_x case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 33, .fit_flag = 0 }; // gyro_y case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 33, .fit_flag = 0 }; // gyro_z - case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 49, .fit_flag = 0 }; // calibrated_gyro_x - case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 49, .fit_flag = 0 }; // calibrated_gyro_y - case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 49, .fit_flag = 0 }; // calibrated_gyro_z + case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 51, .fit_flag = 0 }; // calibrated_gyro_x + case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 51, .fit_flag = 0 }; // calibrated_gyro_y + case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 51, .fit_flag = 0 }; // calibrated_gyro_z default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -5812,12 +5925,12 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_accelerometer_data(FIT_UINT16 fi case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 33, .fit_flag = 0 }; // accel_x case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 33, .fit_flag = 0 }; // accel_y case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 33, .fit_flag = 0 }; // accel_z - case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 50, .fit_flag = 0 }; // calibrated_accel_x - case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 50, .fit_flag = 0 }; // calibrated_accel_y - case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 50, .fit_flag = 0 }; // calibrated_accel_z - case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 51, .fit_flag = 0 }; // compressed_calibrated_accel_x - case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 51, .fit_flag = 0 }; // compressed_calibrated_accel_y - case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 51, .fit_flag = 0 }; // compressed_calibrated_accel_z + case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 52, .fit_flag = 0 }; // calibrated_accel_x + case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 52, .fit_flag = 0 }; // calibrated_accel_y + case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 52, .fit_flag = 0 }; // calibrated_accel_z + case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 53, .fit_flag = 0 }; // compressed_calibrated_accel_x + case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 53, .fit_flag = 0 }; // compressed_calibrated_accel_y + case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 53, .fit_flag = 0 }; // compressed_calibrated_accel_z default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -5829,9 +5942,9 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_magnetometer_data(FIT_UINT16 fie case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 33, .fit_flag = 0 }; // mag_x case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 33, .fit_flag = 0 }; // mag_y case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 33, .fit_flag = 0 }; // mag_z - case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 52, .fit_flag = 0 }; // calibrated_mag_x - case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 52, .fit_flag = 0 }; // calibrated_mag_y - case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 52, .fit_flag = 0 }; // calibrated_mag_z + case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 54, .fit_flag = 0 }; // calibrated_mag_x + case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 54, .fit_flag = 0 }; // calibrated_mag_y + case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 54, .fit_flag = 0 }; // calibrated_mag_z default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -5840,7 +5953,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_barometer_data(FIT_UINT16 field) case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // timestamp_ms case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // sample_time_offset - case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 42, .fit_flag = 0 }; // baro_pres + case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 43, .fit_flag = 0 }; // baro_pres default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -5852,9 +5965,9 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_three_d_sensor_calibration(FIT_U { FIT_UINT32 sensor_type = fit_interp_string_value(interp, 0); if( sensor_type == 0 ){ // accelerometer - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 50, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 52, .fit_flag = 0 }; }else if( sensor_type == 1 ){ // gyroscope - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 49, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 51, .fit_flag = 0 }; } return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } @@ -5873,7 +5986,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_one_d_sensor_calibration(FIT_UIN { FIT_UINT32 sensor_type = fit_interp_string_value(interp, 0); if( sensor_type == 3 ){ // barometer - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 42, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 43, .fit_flag = 0 }; } return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } @@ -5918,14 +6031,14 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_aviation_attitude(FIT_UINT16 fie case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // timestamp_ms case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // system_time - case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 53, .fit_flag = 0 }; // pitch - case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 53, .fit_flag = 0 }; // roll - case 4: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 54, .fit_flag = 0 }; // accel_lateral - case 5: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 54, .fit_flag = 0 }; // accel_normal - case 6: return (FIT_FIELD_INFO){.scale = 1024, .offset = 0, .fit_type = 0, .fit_unit = 55, .fit_flag = 0 }; // turn_rate + case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 55, .fit_flag = 0 }; // pitch + case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 55, .fit_flag = 0 }; // roll + case 4: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 56, .fit_flag = 0 }; // accel_lateral + case 5: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 56, .fit_flag = 0 }; // accel_normal + case 6: return (FIT_FIELD_INFO){.scale = 1024, .offset = 0, .fit_type = 0, .fit_unit = 57, .fit_flag = 0 }; // turn_rate case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 109, .fit_unit = 0, .fit_flag = 0 }; // stage case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 11, .fit_flag = 0 }; // attitude_stage_complete - case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 53, .fit_flag = 0 }; // track + case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 55, .fit_flag = 0 }; // track case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 110, .fit_unit = 0, .fit_flag = 0 }; // validity default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } @@ -5974,7 +6087,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_set(FIT_UINT16 field){ case 4: return (FIT_FIELD_INFO){.scale = 16, .offset = 0, .fit_type = 0, .fit_unit = 9, .fit_flag = 0 }; // weight case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 123, .fit_unit = 0, .fit_flag = 0 }; // set_type case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 0, .fit_flag = 1 }; // start_time - case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 124, .fit_unit = 0, .fit_flag = 0 }; // category + case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 125, .fit_unit = 0, .fit_flag = 0 }; // category case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // category_subtype case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 122, .fit_unit = 0, .fit_flag = 0 }; // weight_display_unit case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 8, .fit_unit = 0, .fit_flag = 0 }; // message_index @@ -5999,7 +6112,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_jump(FIT_UINT16 field){ } static FIT_FIELD_INFO rzfit_objc_field_info_for_split(FIT_UINT16 field){ switch( field ){ - case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 167, .fit_unit = 0, .fit_flag = 0 }; // split_type + case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 170, .fit_unit = 0, .fit_flag = 0 }; // split_type case 1: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // total_elapsed_time case 2: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // total_timer_time case 3: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // total_distance @@ -6012,7 +6125,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_climb_pro(FIT_UINT16 field){ case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 20, .fit_flag = 0 }; // position_lat case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 20, .fit_flag = 0 }; // position_long - case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 168, .fit_unit = 0, .fit_flag = 0 }; // climb_pro_event + case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 171, .fit_unit = 0, .fit_flag = 0 }; // climb_pro_event case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // climb_number case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // climb_category case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // current_dist @@ -6231,6 +6344,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_segment_file(FIT_UINT16 field){ } static FIT_FIELD_INFO rzfit_objc_field_info_for_workout(FIT_UINT16 field){ switch( field ){ + case 254: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 8, .fit_unit = 0, .fit_flag = 0 }; // message_index case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 23, .fit_unit = 0, .fit_flag = 0 }; // sport case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 62, .fit_unit = 0, .fit_flag = 0 }; // capabilities case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // num_valid_steps @@ -6268,11 +6382,11 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_workout_step(FIT_UINT16 field, F }else if( duration_type == 1 ){ // distance return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; }else if( duration_type == 2 ){ // hr_less_than - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 56, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 58, .fit_flag = 0 }; }else if( duration_type == 3 ){ // hr_greater_than - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 56, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 58, .fit_flag = 0 }; }else if( duration_type == 4 ){ // calories - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 48, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 49, .fit_flag = 0 }; }else if( duration_type == 6 ){ // repeat_until_steps_cmplt return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; }else if( duration_type == 7 ){ // repeat_until_time @@ -6290,9 +6404,9 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_workout_step(FIT_UINT16 field, F }else if( duration_type == 13 ){ // repeat_until_power_greater_than return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; }else if( duration_type == 14 ){ // power_less_than - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 57, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 59, .fit_flag = 0 }; }else if( duration_type == 15 ){ // power_greater_than - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 57, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 59, .fit_flag = 0 }; }else if( duration_type == 29 ){ // reps return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } @@ -6318,15 +6432,15 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_workout_step(FIT_UINT16 field, F }else if( duration_type == 8 ){ // repeat_until_distance return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; }else if( duration_type == 9 ){ // repeat_until_calories - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 48, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 49, .fit_flag = 0 }; }else if( duration_type == 10 ){ // repeat_until_hr_less_than - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 56, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 58, .fit_flag = 0 }; }else if( duration_type == 11 ){ // repeat_until_hr_greater_than - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 56, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 58, .fit_flag = 0 }; }else if( duration_type == 12 ){ // repeat_until_power_less_than - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 57, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 59, .fit_flag = 0 }; }else if( duration_type == 13 ){ // repeat_until_power_greater_than - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 57, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 59, .fit_flag = 0 }; }else if( target_type == 11 ){ // swim_stroke return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 71, .fit_unit = 0, .fit_flag = 0 }; } @@ -6338,11 +6452,11 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_workout_step(FIT_UINT16 field, F if( target_type == 0 ){ // speed return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; }else if( target_type == 1 ){ // heart_rate - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 56, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 58, .fit_flag = 0 }; }else if( target_type == 3 ){ // cadence return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 14, .fit_flag = 0 }; }else if( target_type == 4 ){ // power - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 57, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 59, .fit_flag = 0 }; } return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } @@ -6352,18 +6466,18 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_workout_step(FIT_UINT16 field, F if( target_type == 0 ){ // speed return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; }else if( target_type == 1 ){ // heart_rate - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 56, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 58, .fit_flag = 0 }; }else if( target_type == 3 ){ // cadence return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 14, .fit_flag = 0 }; }else if( target_type == 4 ){ // power - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 57, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 59, .fit_flag = 0 }; } return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 34, .fit_unit = 0, .fit_flag = 0 }; // intensity case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // notes case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 98, .fit_unit = 0, .fit_flag = 0 }; // equipment - case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 124, .fit_unit = 0, .fit_flag = 0 }; // exercise_category + case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 125, .fit_unit = 0, .fit_flag = 0 }; // exercise_category case 11: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // exercise_name case 12: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 9, .fit_flag = 0 }; // exercise_weight case 13: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 122, .fit_unit = 0, .fit_flag = 0 }; // weight_display_unit @@ -6390,11 +6504,11 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_workout_step(FIT_UINT16 field, F if( secondary_target_type == 0 ){ // speed return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; }else if( secondary_target_type == 1 ){ // heart_rate - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 56, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 58, .fit_flag = 0 }; }else if( secondary_target_type == 3 ){ // cadence return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 14, .fit_flag = 0 }; }else if( secondary_target_type == 4 ){ // power - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 57, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 59, .fit_flag = 0 }; } return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } @@ -6404,11 +6518,11 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_workout_step(FIT_UINT16 field, F if( secondary_target_type == 0 ){ // speed return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; }else if( secondary_target_type == 1 ){ // heart_rate - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 56, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 67, .fit_unit = 58, .fit_flag = 0 }; }else if( secondary_target_type == 3 ){ // cadence return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 14, .fit_flag = 0 }; }else if( secondary_target_type == 4 ){ // power - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 57, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 68, .fit_unit = 59, .fit_flag = 0 }; } return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } @@ -6418,7 +6532,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_workout_step(FIT_UINT16 field, F static FIT_FIELD_INFO rzfit_objc_field_info_for_exercise_title(FIT_UINT16 field){ switch( field ){ case 254: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 8, .fit_unit = 0, .fit_flag = 0 }; // message_index - case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 124, .fit_unit = 0, .fit_flag = 0 }; // exercise_category + case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 125, .fit_unit = 0, .fit_flag = 0 }; // exercise_category case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // exercise_name case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // wkt_step_name default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; @@ -6431,7 +6545,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_schedule(FIT_UINT16 field, FIT_I { FIT_UINT32 manufacturer = fit_interp_string_value(interp, 0); if( manufacturer == 263 ){ // favero_electronics - return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 166, .fit_unit = 0, .fit_flag = 0 }; + return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 169, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 1 ){ // garmin return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 59, .fit_unit = 0, .fit_flag = 0 }; }else if( manufacturer == 15 ){ // dynastream @@ -6475,24 +6589,25 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_weight_scale(FIT_UINT16 field){ case 3: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 9, .fit_flag = 0 }; // visceral_fat_mass case 4: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 9, .fit_flag = 0 }; // bone_mass case 5: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 9, .fit_flag = 0 }; // muscle_mass - case 7: return (FIT_FIELD_INFO){.scale = 4, .offset = 0, .fit_type = 0, .fit_unit = 58, .fit_flag = 0 }; // basal_met + case 7: return (FIT_FIELD_INFO){.scale = 4, .offset = 0, .fit_type = 0, .fit_unit = 60, .fit_flag = 0 }; // basal_met case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // physique_rating - case 9: return (FIT_FIELD_INFO){.scale = 4, .offset = 0, .fit_type = 0, .fit_unit = 58, .fit_flag = 0 }; // active_met + case 9: return (FIT_FIELD_INFO){.scale = 4, .offset = 0, .fit_type = 0, .fit_unit = 60, .fit_flag = 0 }; // active_met case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 7, .fit_flag = 0 }; // metabolic_age case 11: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // visceral_fat_rating case 12: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 8, .fit_unit = 0, .fit_flag = 0 }; // user_profile_index + case 13: return (FIT_FIELD_INFO){.scale = 10, .offset = 0, .fit_type = 0, .fit_unit = 61, .fit_flag = 0 }; // bmi default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } static FIT_FIELD_INFO rzfit_objc_field_info_for_blood_pressure(FIT_UINT16 field){ switch( field ){ case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp - case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 59, .fit_flag = 0 }; // systolic_pressure - case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 59, .fit_flag = 0 }; // diastolic_pressure - case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 59, .fit_flag = 0 }; // mean_arterial_pressure - case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 59, .fit_flag = 0 }; // map_3_sample_mean - case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 59, .fit_flag = 0 }; // map_morning_values - case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 59, .fit_flag = 0 }; // map_evening_values + case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 62, .fit_flag = 0 }; // systolic_pressure + case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 62, .fit_flag = 0 }; // diastolic_pressure + case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 62, .fit_flag = 0 }; // mean_arterial_pressure + case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 62, .fit_flag = 0 }; // map_3_sample_mean + case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 62, .fit_flag = 0 }; // map_morning_values + case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 62, .fit_flag = 0 }; // map_evening_values case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 10, .fit_flag = 0 }; // heart_rate case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 64, .fit_unit = 0, .fit_flag = 0 }; // heart_rate_type case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 69, .fit_unit = 0, .fit_flag = 0 }; // status @@ -6505,9 +6620,9 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_monitoring_info(FIT_UINT16 field case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 7, .fit_unit = 1, .fit_flag = 1 }; // local_timestamp case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 72, .fit_unit = 0, .fit_flag = 0 }; // activity_type - case 3: return (FIT_FIELD_INFO){.scale = 5000, .offset = 0, .fit_type = 0, .fit_unit = 60, .fit_flag = 0 }; // cycles_to_distance - case 4: return (FIT_FIELD_INFO){.scale = 5000, .offset = 0, .fit_type = 0, .fit_unit = 61, .fit_flag = 0 }; // cycles_to_calories - case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 62, .fit_flag = 0 }; // resting_metabolic_rate + case 3: return (FIT_FIELD_INFO){.scale = 5000, .offset = 0, .fit_type = 0, .fit_unit = 63, .fit_flag = 0 }; // cycles_to_distance + case 4: return (FIT_FIELD_INFO){.scale = 5000, .offset = 0, .fit_type = 0, .fit_unit = 64, .fit_flag = 0 }; // cycles_to_calories + case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 65, .fit_flag = 0 }; // resting_metabolic_rate default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -6535,8 +6650,8 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_monitoring(FIT_UINT16 field, FIT case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 72, .fit_unit = 0, .fit_flag = 0 }; // activity_type case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 73, .fit_unit = 0, .fit_flag = 0 }; // activity_subtype case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 74, .fit_unit = 0, .fit_flag = 0 }; // activity_level - case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 63, .fit_flag = 0 }; // distance_16 - case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 64, .fit_flag = 0 }; // cycles_16 + case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 66, .fit_flag = 0 }; // distance_16 + case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 67, .fit_flag = 0 }; // cycles_16 case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // active_time_16 case 11: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 7, .fit_unit = 0, .fit_flag = 1 }; // local_timestamp case 12: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 32, .fit_flag = 0 }; // temperature @@ -6545,11 +6660,11 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_monitoring(FIT_UINT16 field, FIT case 16: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 6, .fit_flag = 0 }; // activity_time case 19: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 24, .fit_flag = 0 }; // active_calories case 24: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // current_activity_type_intensity - case 25: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 65, .fit_flag = 0 }; // timestamp_min_8 + case 25: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 50, .fit_flag = 0 }; // timestamp_min_8 case 26: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // timestamp_16 case 27: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 10, .fit_flag = 0 }; // heart_rate case 28: return (FIT_FIELD_INFO){.scale = 10, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // intensity - case 29: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 65, .fit_flag = 0 }; // duration_min + case 29: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 50, .fit_flag = 0 }; // duration_min case 30: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // duration case 31: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // ascent case 32: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 8, .fit_flag = 0 }; // descent @@ -6558,6 +6673,23 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_monitoring(FIT_UINT16 field, FIT default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } +static FIT_FIELD_INFO rzfit_objc_field_info_for_monitoring_hr_data(FIT_UINT16 field){ + switch( field ){ + case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp + case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 10, .fit_flag = 0 }; // resting_heart_rate + case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 10, .fit_flag = 0 }; // current_day_resting_heart_rate + default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; + } +} +static FIT_FIELD_INFO rzfit_objc_field_info_for_spo2_data(FIT_UINT16 field){ + switch( field ){ + case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp + case 0: return (FIT_FIELD_INFO){.scale = 1, .offset = 0, .fit_type = 0, .fit_unit = 17, .fit_flag = 0 }; // reading_spo2 + case 1: return (FIT_FIELD_INFO){.scale = 1, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // reading_confidence + case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 166, .fit_unit = 0, .fit_flag = 0 }; // mode + default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; + } +} static FIT_FIELD_INFO rzfit_objc_field_info_for_hr(FIT_UINT16 field){ switch( field ){ case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 0, .fit_flag = 1 }; // timestamp @@ -6576,6 +6708,19 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_stress_level(FIT_UINT16 field){ default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } +static FIT_FIELD_INFO rzfit_objc_field_info_for_max_met_data(FIT_UINT16 field){ + switch( field ){ + case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 0, .fit_flag = 1 }; // update_time + case 2: return (FIT_FIELD_INFO){.scale = 10, .offset = 0, .fit_type = 0, .fit_unit = 68, .fit_flag = 0 }; // vo2_max + case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 23, .fit_unit = 0, .fit_flag = 0 }; // sport + case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 31, .fit_unit = 0, .fit_flag = 0 }; // sub_sport + case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 124, .fit_unit = 0, .fit_flag = 0 }; // max_met_category + case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // calibrated_data + case 12: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 176, .fit_unit = 0, .fit_flag = 0 }; // hr_source + case 13: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 175, .fit_unit = 0, .fit_flag = 0 }; // speed_source + default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; + } +} static FIT_FIELD_INFO rzfit_objc_field_info_for_memo_glob(FIT_UINT16 field){ switch( field ){ case 250: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // part_index @@ -6587,6 +6732,13 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_memo_glob(FIT_UINT16 field){ default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } +static FIT_FIELD_INFO rzfit_objc_field_info_for_sleep_level(FIT_UINT16 field){ + switch( field ){ + case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp + case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 165, .fit_unit = 0, .fit_flag = 0 }; // sleep_level + default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; + } +} static FIT_FIELD_INFO rzfit_objc_field_info_for_ant_channel_id(FIT_UINT16 field){ switch( field ){ case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // channel_number @@ -6670,9 +6822,9 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_dive_summary(FIT_UINT16 field){ case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 36, .fit_flag = 0 }; // o2_toxicity case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // dive_number case 11: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // bottom_time - case 12: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 45, .fit_flag = 0 }; // avg_pressure_sac - case 13: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 46, .fit_flag = 0 }; // avg_volume_sac - case 14: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 46, .fit_flag = 0 }; // avg_rmv + case 12: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 46, .fit_flag = 0 }; // avg_pressure_sac + case 13: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 47, .fit_flag = 0 }; // avg_volume_sac + case 14: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 47, .fit_flag = 0 }; // avg_rmv case 15: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // descent_time case 16: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 1, .fit_flag = 0 }; // ascent_time case 17: return (FIT_FIELD_INFO){.scale = 1000, .offset = 0, .fit_type = 0, .fit_unit = 13, .fit_flag = 0 }; // avg_ascent_rate @@ -6689,11 +6841,46 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_hrv(FIT_UINT16 field){ default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } +static FIT_FIELD_INFO rzfit_objc_field_info_for_beat_intervals(FIT_UINT16 field){ + switch( field ){ + case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 0, .fit_flag = 1 }; // timestamp + case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // timestamp_ms + case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // time + default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; + } +} +static FIT_FIELD_INFO rzfit_objc_field_info_for_hrv_status_summary(FIT_UINT16 field){ + switch( field ){ + case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 0, .fit_flag = 1 }; // timestamp + case 0: return (FIT_FIELD_INFO){.scale = 128, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // weekly_average + case 1: return (FIT_FIELD_INFO){.scale = 128, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // last_night_average + case 2: return (FIT_FIELD_INFO){.scale = 128, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // last_night_5_min_high + case 3: return (FIT_FIELD_INFO){.scale = 128, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // baseline_low_upper + case 4: return (FIT_FIELD_INFO){.scale = 128, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // baseline_balanced_lower + case 5: return (FIT_FIELD_INFO){.scale = 128, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // baseline_balanced_upper + case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 177, .fit_unit = 0, .fit_flag = 0 }; // status + default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; + } +} +static FIT_FIELD_INFO rzfit_objc_field_info_for_hrv_value(FIT_UINT16 field){ + switch( field ){ + case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 0, .fit_flag = 1 }; // timestamp + case 0: return (FIT_FIELD_INFO){.scale = 128, .offset = 0, .fit_type = 0, .fit_unit = 2, .fit_flag = 0 }; // value + default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; + } +} +static FIT_FIELD_INFO rzfit_objc_field_info_for_respiration_rate(FIT_UINT16 field){ + switch( field ){ + case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 0, .fit_flag = 1 }; // timestamp + case 0: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 69, .fit_flag = 0 }; // respiration_rate + default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; + } +} static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_update(FIT_UINT16 field){ switch( field ){ case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 96, .fit_unit = 0, .fit_flag = 0 }; // sensor - case 1: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 66, .fit_flag = 0 }; // pressure + case 1: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 70, .fit_flag = 0 }; // pressure default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -6701,9 +6888,28 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ switch( field ){ case 253: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 6, .fit_unit = 1, .fit_flag = 1 }; // timestamp case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 96, .fit_unit = 0, .fit_flag = 0 }; // sensor - case 1: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 66, .fit_flag = 0 }; // start_pressure - case 2: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 66, .fit_flag = 0 }; // end_pressure - case 3: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 67, .fit_flag = 0 }; // volume_used + case 1: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 70, .fit_flag = 0 }; // start_pressure + case 2: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 70, .fit_flag = 0 }; // end_pressure + case 3: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 71, .fit_flag = 0 }; // volume_used + default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; + } +} +static FIT_FIELD_INFO rzfit_objc_field_info_for_sleep_assessment(FIT_UINT16 field){ + switch( field ){ + case 0: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // combined_awake_score + case 1: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // awake_time_score + case 2: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // awakenings_count_score + case 3: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // deep_sleep_score + case 4: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // sleep_duration_score + case 5: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // light_sleep_score + case 6: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // overall_sleep_score + case 7: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // sleep_quality_score + case 8: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // sleep_recovery_score + case 9: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // rem_sleep_score + case 10: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // sleep_restlessness_score + case 11: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // awakenings_count + case 14: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // interruptions_score + case 15: return (FIT_FIELD_INFO){.scale = 100, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; // average_stress_during_sleep default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } @@ -7318,6 +7524,8 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 35: return @"training_stress_score"; case 36: return @"intensity_factor"; case 37: return @"left_right_balance"; + case 38: return @"end_position_lat"; + case 39: return @"end_position_long"; case 41: return @"avg_stroke_count"; case 42: return @"avg_stroke_distance"; case 43: return @"swim_stroke"; @@ -7373,6 +7581,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 103: return @"avg_left_pedal_smoothness"; case 104: return @"avg_right_pedal_smoothness"; case 105: return @"avg_combined_pedal_smoothness"; + case 110: return @"sport_profile_name"; case 111: return @"sport_index"; case 112: return @"time_standing"; case 113: return @"stand_count"; @@ -7421,6 +7630,10 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 183: return @"jump_count"; case 186: return @"avg_grit"; case 187: return @"avg_flow"; + case 194: return @"avg_spo2"; + case 195: return @"avg_stress"; + case 197: return @"sdrr_hrv"; + case 198: return @"rmssd_hrv"; case 199: return @"total_fractional_ascent"; case 200: return @"total_fractional_descent"; case 208: return @"avg_core_temperature"; @@ -7682,6 +7895,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 83: return @"vertical_ratio"; case 84: return @"stance_time_balance"; case 85: return @"step_length"; + case 87: return @"cycle_length16"; case 91: return @"absolute_pressure"; case 92: return @"depth"; case 93: return @"next_stop_depth"; @@ -7694,6 +7908,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 108: return @"enhanced_respiration_rate"; case 114: return @"grit"; case 115: return @"flow"; + case 116: return @"current_stress"; case 117: return @"ebike_travel_range"; case 118: return @"ebike_battery_level"; case 119: return @"ebike_assist_mode"; @@ -7762,6 +7977,8 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ return @"comm_timeout"; }else if( event == 56 ){ // dive_alert return @"dive_alert"; + }else if( event == 54 ){ // auto_activity_detect + return @"auto_activity_detect_duration"; }else if( event == 75 ){ // radar_threat_alert return @"radar_threat_alert"; }else{ @@ -7776,6 +7993,16 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 11: return @"rear_gear_num"; case 12: return @"rear_gear"; case 13: return @"device_index"; + case 14: return @"activity_type"; + case 15: + { + FIT_UINT32 event = fit_interp_string_value(interp, 0); + if( event == 54 ){ // auto_activity_detect + return @"auto_activity_detect_start_timestamp"; + }else{ + return @"start_timestamp"; + } + } case 21: return @"radar_threat_level_max"; case 22: return @"radar_threat_count"; case 23: return @"radar_threat_avg_approach_speed"; @@ -8409,6 +8636,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ static NSString * rzfit_objc_field_num_to_string_for_workout( FIT_UINT8 field_num ){ switch( field_num ){ + case 254: return @"message_index"; case 4: return @"sport"; case 5: return @"capabilities"; case 6: return @"num_valid_steps"; @@ -8673,6 +8901,7 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 10: return @"metabolic_age"; case 11: return @"visceral_fat_rating"; case 12: return @"user_profile_index"; + case 13: return @"bmi"; default: return [NSString stringWithFormat:@"weight_scale_field_num_%u", (unsigned int)field_num]; } } @@ -8755,6 +8984,25 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ } } +static NSString * rzfit_objc_field_num_to_string_for_monitoring_hr_data( FIT_UINT8 field_num ){ + switch( field_num ){ + case 253: return @"timestamp"; + case 0: return @"resting_heart_rate"; + case 1: return @"current_day_resting_heart_rate"; + default: return [NSString stringWithFormat:@"monitoring_hr_data_field_num_%u", (unsigned int)field_num]; + } +} + +static NSString * rzfit_objc_field_num_to_string_for_spo2_data( FIT_UINT8 field_num ){ + switch( field_num ){ + case 253: return @"timestamp"; + case 0: return @"reading_spo2"; + case 1: return @"reading_confidence"; + case 2: return @"mode"; + default: return [NSString stringWithFormat:@"spo2_data_field_num_%u", (unsigned int)field_num]; + } +} + static NSString * rzfit_objc_field_num_to_string_for_hr( FIT_UINT8 field_num ){ switch( field_num ){ case 253: return @"timestamp"; @@ -8775,6 +9023,20 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ } } +static NSString * rzfit_objc_field_num_to_string_for_max_met_data( FIT_UINT8 field_num ){ + switch( field_num ){ + case 0: return @"update_time"; + case 2: return @"vo2_max"; + case 5: return @"sport"; + case 6: return @"sub_sport"; + case 8: return @"max_met_category"; + case 9: return @"calibrated_data"; + case 12: return @"hr_source"; + case 13: return @"speed_source"; + default: return [NSString stringWithFormat:@"max_met_data_field_num_%u", (unsigned int)field_num]; + } +} + static NSString * rzfit_objc_field_num_to_string_for_memo_glob( FIT_UINT8 field_num ){ switch( field_num ){ case 250: return @"part_index"; @@ -8787,6 +9049,14 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ } } +static NSString * rzfit_objc_field_num_to_string_for_sleep_level( FIT_UINT8 field_num ){ + switch( field_num ){ + case 253: return @"timestamp"; + case 0: return @"sleep_level"; + default: return [NSString stringWithFormat:@"sleep_level_field_num_%u", (unsigned int)field_num]; + } +} + static NSString * rzfit_objc_field_num_to_string_for_ant_channel_id( FIT_UINT8 field_num ){ switch( field_num ){ case 0: return @"channel_number"; @@ -8897,6 +9167,45 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ } } +static NSString * rzfit_objc_field_num_to_string_for_beat_intervals( FIT_UINT8 field_num ){ + switch( field_num ){ + case 253: return @"timestamp"; + case 0: return @"timestamp_ms"; + case 1: return @"time"; + default: return [NSString stringWithFormat:@"beat_intervals_field_num_%u", (unsigned int)field_num]; + } +} + +static NSString * rzfit_objc_field_num_to_string_for_hrv_status_summary( FIT_UINT8 field_num ){ + switch( field_num ){ + case 253: return @"timestamp"; + case 0: return @"weekly_average"; + case 1: return @"last_night_average"; + case 2: return @"last_night_5_min_high"; + case 3: return @"baseline_low_upper"; + case 4: return @"baseline_balanced_lower"; + case 5: return @"baseline_balanced_upper"; + case 6: return @"status"; + default: return [NSString stringWithFormat:@"hrv_status_summary_field_num_%u", (unsigned int)field_num]; + } +} + +static NSString * rzfit_objc_field_num_to_string_for_hrv_value( FIT_UINT8 field_num ){ + switch( field_num ){ + case 253: return @"timestamp"; + case 0: return @"value"; + default: return [NSString stringWithFormat:@"hrv_value_field_num_%u", (unsigned int)field_num]; + } +} + +static NSString * rzfit_objc_field_num_to_string_for_respiration_rate( FIT_UINT8 field_num ){ + switch( field_num ){ + case 253: return @"timestamp"; + case 0: return @"respiration_rate"; + default: return [NSString stringWithFormat:@"respiration_rate_field_num_%u", (unsigned int)field_num]; + } +} + static NSString * rzfit_objc_field_num_to_string_for_tank_update( FIT_UINT8 field_num ){ switch( field_num ){ case 253: return @"timestamp"; @@ -8917,6 +9226,26 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ } } +static NSString * rzfit_objc_field_num_to_string_for_sleep_assessment( FIT_UINT8 field_num ){ + switch( field_num ){ + case 0: return @"combined_awake_score"; + case 1: return @"awake_time_score"; + case 2: return @"awakenings_count_score"; + case 3: return @"deep_sleep_score"; + case 4: return @"sleep_duration_score"; + case 5: return @"light_sleep_score"; + case 6: return @"overall_sleep_score"; + case 7: return @"sleep_quality_score"; + case 8: return @"sleep_recovery_score"; + case 9: return @"rem_sleep_score"; + case 10: return @"sleep_restlessness_score"; + case 11: return @"awakenings_count"; + case 14: return @"interruptions_score"; + case 15: return @"average_stress_during_sleep"; + default: return [NSString stringWithFormat:@"sleep_assessment_field_num_%u", (unsigned int)field_num]; + } +} + #pragma mark - public section NSString * rzfit_objc_string_from_mesg_num( FIT_UINT16 mesg_num ){ switch(mesg_num){ @@ -8999,19 +9328,28 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 208: return @"magnetometer_data"; case 209: return @"barometer_data"; case 210: return @"one_d_sensor_calibration"; + case 211: return @"monitoring_hr_data"; case 216: return @"time_in_zone"; case 225: return @"set"; case 227: return @"stress_level"; + case 229: return @"max_met_data"; case 258: return @"dive_settings"; case 259: return @"dive_gas"; case 262: return @"dive_alarm"; case 264: return @"exercise_title"; case 268: return @"dive_summary"; + case 269: return @"spo2_data"; + case 275: return @"sleep_level"; case 285: return @"jump"; + case 290: return @"beat_intervals"; + case 297: return @"respiration_rate"; case 312: return @"split"; case 317: return @"climb_pro"; case 319: return @"tank_update"; case 323: return @"tank_summary"; + case 346: return @"sleep_assessment"; + case 370: return @"hrv_status_summary"; + case 371: return @"hrv_value"; case 375: return @"device_aux_battery_info"; case 393: return @"dive_apnea_alarm"; case 0xFF00: return @"mfg_range_min"; @@ -9062,34 +9400,38 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 37: return @"Breaths/min"; case 38: return @"kGrit"; case 39: return @"Flow"; - case 40: return @"strokes/min"; - case 41: return @"m/s,m"; - case 42: return @"Pa"; - case 43: return @"km"; - case 44: return @"depends on sensor"; - case 45: return @"bar/min"; - case 46: return @"L/min"; - case 47: return @"V"; - case 48: return @"calories"; - case 49: return @"deg/s"; - case 50: return @"g"; - case 51: return @"mG"; - case 52: return @"G"; - case 53: return @"radians"; - case 54: return @"m/s^2"; - case 55: return @"radians/second"; - case 56: return @"% or bpm"; - case 57: return @"% or watts"; - case 58: return @"kcal/day"; - case 59: return @"mmHg"; - case 60: return @"m/cycle"; - case 61: return @"kcal/cycle"; - case 62: return @"kcal / day"; - case 63: return @"100 * m"; - case 64: return @"2 * cycles (steps)"; - case 65: return @"min"; - case 66: return @"bar"; - case 67: return @"L"; + case 40: return @"mS"; + case 41: return @"strokes/min"; + case 42: return @"m/s,m"; + case 43: return @"Pa"; + case 44: return @"km"; + case 45: return @"depends on sensor"; + case 46: return @"bar/min"; + case 47: return @"L/min"; + case 48: return @"V"; + case 49: return @"calories"; + case 50: return @"min"; + case 51: return @"deg/s"; + case 52: return @"g"; + case 53: return @"mG"; + case 54: return @"G"; + case 55: return @"radians"; + case 56: return @"m/s^2"; + case 57: return @"radians/second"; + case 58: return @"% or bpm"; + case 59: return @"% or watts"; + case 60: return @"kcal/day"; + case 61: return @"kg/m^2"; + case 62: return @"mmHg"; + case 63: return @"m/cycle"; + case 64: return @"kcal/cycle"; + case 65: return @"kcal / day"; + case 66: return @"100 * m"; + case 67: return @"2 * cycles (steps)"; + case 68: return @"mL/kg/min"; + case 69: return @"breaths/min"; + case 70: return @"bar"; + case 71: return @"L"; default: return [NSString stringWithFormat:@"FIT_UNIT_%u", (unsigned int)fit_unit]; } } @@ -9174,19 +9516,28 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 208: return rzfit_objc_field_num_to_string_for_magnetometer_data(field); case 209: return rzfit_objc_field_num_to_string_for_barometer_data(field); case 210: return rzfit_objc_field_num_to_string_for_one_d_sensor_calibration(field,interp); + case 211: return rzfit_objc_field_num_to_string_for_monitoring_hr_data(field); case 216: return rzfit_objc_field_num_to_string_for_time_in_zone(field); case 225: return rzfit_objc_field_num_to_string_for_set(field); case 227: return rzfit_objc_field_num_to_string_for_stress_level(field); + case 229: return rzfit_objc_field_num_to_string_for_max_met_data(field); case 258: return rzfit_objc_field_num_to_string_for_dive_settings(field,interp); case 259: return rzfit_objc_field_num_to_string_for_dive_gas(field); case 262: return rzfit_objc_field_num_to_string_for_dive_alarm(field); case 264: return rzfit_objc_field_num_to_string_for_exercise_title(field); case 268: return rzfit_objc_field_num_to_string_for_dive_summary(field); + case 269: return rzfit_objc_field_num_to_string_for_spo2_data(field); + case 275: return rzfit_objc_field_num_to_string_for_sleep_level(field); case 285: return rzfit_objc_field_num_to_string_for_jump(field); + case 290: return rzfit_objc_field_num_to_string_for_beat_intervals(field); + case 297: return rzfit_objc_field_num_to_string_for_respiration_rate(field); case 312: return rzfit_objc_field_num_to_string_for_split(field); case 317: return rzfit_objc_field_num_to_string_for_climb_pro(field); case 319: return rzfit_objc_field_num_to_string_for_tank_update(field); case 323: return rzfit_objc_field_num_to_string_for_tank_summary(field); + case 346: return rzfit_objc_field_num_to_string_for_sleep_assessment(field); + case 370: return rzfit_objc_field_num_to_string_for_hrv_status_summary(field); + case 371: return rzfit_objc_field_num_to_string_for_hrv_value(field); case 375: return rzfit_objc_field_num_to_string_for_device_aux_battery_info(field); case 393: return rzfit_objc_field_num_to_string_for_dive_apnea_alarm(field); default: return [NSString stringWithFormat:@"MESG_NUM_%u_FIELD_%u", (unsigned int)global_mesg_num, (unsigned int)field]; @@ -9318,55 +9669,61 @@ static FIT_FIELD_INFO rzfit_objc_field_info_for_tank_summary(FIT_UINT16 field){ case 121: return rzfit_objc_string_from_bike_light_beam_angle_mode( (FIT_UINT8) val); case 122: return rzfit_objc_string_from_fit_base_unit( (FIT_UINT16) val); case 123: return rzfit_objc_string_from_set_type( (FIT_UINT8) val); - case 124: return rzfit_objc_string_from_exercise_category( (FIT_UINT16) val); - case 125: return rzfit_objc_string_from_bench_press_exercise_name( (FIT_UINT16) val); - case 126: return rzfit_objc_string_from_calf_raise_exercise_name( (FIT_UINT16) val); - case 127: return rzfit_objc_string_from_cardio_exercise_name( (FIT_UINT16) val); - case 128: return rzfit_objc_string_from_carry_exercise_name( (FIT_UINT16) val); - case 129: return rzfit_objc_string_from_chop_exercise_name( (FIT_UINT16) val); - case 130: return rzfit_objc_string_from_core_exercise_name( (FIT_UINT16) val); - case 131: return rzfit_objc_string_from_crunch_exercise_name( (FIT_UINT16) val); - case 132: return rzfit_objc_string_from_curl_exercise_name( (FIT_UINT16) val); - case 133: return rzfit_objc_string_from_deadlift_exercise_name( (FIT_UINT16) val); - case 134: return rzfit_objc_string_from_flye_exercise_name( (FIT_UINT16) val); - case 135: return rzfit_objc_string_from_hip_raise_exercise_name( (FIT_UINT16) val); - case 136: return rzfit_objc_string_from_hip_stability_exercise_name( (FIT_UINT16) val); - case 137: return rzfit_objc_string_from_hip_swing_exercise_name( (FIT_UINT16) val); - case 138: return rzfit_objc_string_from_hyperextension_exercise_name( (FIT_UINT16) val); - case 139: return rzfit_objc_string_from_lateral_raise_exercise_name( (FIT_UINT16) val); - case 140: return rzfit_objc_string_from_leg_curl_exercise_name( (FIT_UINT16) val); - case 141: return rzfit_objc_string_from_leg_raise_exercise_name( (FIT_UINT16) val); - case 142: return rzfit_objc_string_from_lunge_exercise_name( (FIT_UINT16) val); - case 143: return rzfit_objc_string_from_olympic_lift_exercise_name( (FIT_UINT16) val); - case 144: return rzfit_objc_string_from_plank_exercise_name( (FIT_UINT16) val); - case 145: return rzfit_objc_string_from_plyo_exercise_name( (FIT_UINT16) val); - case 146: return rzfit_objc_string_from_pull_up_exercise_name( (FIT_UINT16) val); - case 147: return rzfit_objc_string_from_push_up_exercise_name( (FIT_UINT16) val); - case 148: return rzfit_objc_string_from_row_exercise_name( (FIT_UINT16) val); - case 149: return rzfit_objc_string_from_shoulder_press_exercise_name( (FIT_UINT16) val); - case 150: return rzfit_objc_string_from_shoulder_stability_exercise_name( (FIT_UINT16) val); - case 151: return rzfit_objc_string_from_shrug_exercise_name( (FIT_UINT16) val); - case 152: return rzfit_objc_string_from_sit_up_exercise_name( (FIT_UINT16) val); - case 153: return rzfit_objc_string_from_squat_exercise_name( (FIT_UINT16) val); - case 154: return rzfit_objc_string_from_total_body_exercise_name( (FIT_UINT16) val); - case 155: return rzfit_objc_string_from_triceps_extension_exercise_name( (FIT_UINT16) val); - case 156: return rzfit_objc_string_from_warm_up_exercise_name( (FIT_UINT16) val); - case 157: return rzfit_objc_string_from_run_exercise_name( (FIT_UINT16) val); - case 158: return rzfit_objc_string_from_water_type( (FIT_ENUM) val); - case 159: return rzfit_objc_string_from_tissue_model_type( (FIT_ENUM) val); - case 160: return rzfit_objc_string_from_dive_gas_status( (FIT_ENUM) val); - case 161: return rzfit_objc_string_from_dive_alert( (FIT_ENUM) val); - case 162: return rzfit_objc_string_from_dive_alarm_type( (FIT_ENUM) val); - case 163: return rzfit_objc_string_from_dive_backlight_mode( (FIT_ENUM) val); - case 164: return rzfit_objc_string_from_ccr_setpoint_switch_mode( (FIT_ENUM) val); - case 165: return rzfit_objc_string_from_dive_gas_mode( (FIT_ENUM) val); - case 166: return rzfit_objc_string_from_favero_product( (FIT_UINT16) val); - case 167: return rzfit_objc_string_from_split_type( (FIT_ENUM) val); - case 168: return rzfit_objc_string_from_climb_pro_event( (FIT_ENUM) val); - case 169: return rzfit_objc_string_from_gas_consumption_rate_type( (FIT_ENUM) val); - case 170: return rzfit_objc_string_from_tap_sensitivity( (FIT_ENUM) val); - case 171: return rzfit_objc_string_from_radar_threat_level_type( (FIT_ENUM) val); - case 172: return rzfit_objc_string_from_no_fly_time_mode( (FIT_ENUM) val); + case 124: return rzfit_objc_string_from_max_met_category( (FIT_ENUM) val); + case 125: return rzfit_objc_string_from_exercise_category( (FIT_UINT16) val); + case 126: return rzfit_objc_string_from_bench_press_exercise_name( (FIT_UINT16) val); + case 127: return rzfit_objc_string_from_calf_raise_exercise_name( (FIT_UINT16) val); + case 128: return rzfit_objc_string_from_cardio_exercise_name( (FIT_UINT16) val); + case 129: return rzfit_objc_string_from_carry_exercise_name( (FIT_UINT16) val); + case 130: return rzfit_objc_string_from_chop_exercise_name( (FIT_UINT16) val); + case 131: return rzfit_objc_string_from_core_exercise_name( (FIT_UINT16) val); + case 132: return rzfit_objc_string_from_crunch_exercise_name( (FIT_UINT16) val); + case 133: return rzfit_objc_string_from_curl_exercise_name( (FIT_UINT16) val); + case 134: return rzfit_objc_string_from_deadlift_exercise_name( (FIT_UINT16) val); + case 135: return rzfit_objc_string_from_flye_exercise_name( (FIT_UINT16) val); + case 136: return rzfit_objc_string_from_hip_raise_exercise_name( (FIT_UINT16) val); + case 137: return rzfit_objc_string_from_hip_stability_exercise_name( (FIT_UINT16) val); + case 138: return rzfit_objc_string_from_hip_swing_exercise_name( (FIT_UINT16) val); + case 139: return rzfit_objc_string_from_hyperextension_exercise_name( (FIT_UINT16) val); + case 140: return rzfit_objc_string_from_lateral_raise_exercise_name( (FIT_UINT16) val); + case 141: return rzfit_objc_string_from_leg_curl_exercise_name( (FIT_UINT16) val); + case 142: return rzfit_objc_string_from_leg_raise_exercise_name( (FIT_UINT16) val); + case 143: return rzfit_objc_string_from_lunge_exercise_name( (FIT_UINT16) val); + case 144: return rzfit_objc_string_from_olympic_lift_exercise_name( (FIT_UINT16) val); + case 145: return rzfit_objc_string_from_plank_exercise_name( (FIT_UINT16) val); + case 146: return rzfit_objc_string_from_plyo_exercise_name( (FIT_UINT16) val); + case 147: return rzfit_objc_string_from_pull_up_exercise_name( (FIT_UINT16) val); + case 148: return rzfit_objc_string_from_push_up_exercise_name( (FIT_UINT16) val); + case 149: return rzfit_objc_string_from_row_exercise_name( (FIT_UINT16) val); + case 150: return rzfit_objc_string_from_shoulder_press_exercise_name( (FIT_UINT16) val); + case 151: return rzfit_objc_string_from_shoulder_stability_exercise_name( (FIT_UINT16) val); + case 152: return rzfit_objc_string_from_shrug_exercise_name( (FIT_UINT16) val); + case 153: return rzfit_objc_string_from_sit_up_exercise_name( (FIT_UINT16) val); + case 154: return rzfit_objc_string_from_squat_exercise_name( (FIT_UINT16) val); + case 155: return rzfit_objc_string_from_total_body_exercise_name( (FIT_UINT16) val); + case 156: return rzfit_objc_string_from_triceps_extension_exercise_name( (FIT_UINT16) val); + case 157: return rzfit_objc_string_from_warm_up_exercise_name( (FIT_UINT16) val); + case 158: return rzfit_objc_string_from_run_exercise_name( (FIT_UINT16) val); + case 159: return rzfit_objc_string_from_water_type( (FIT_ENUM) val); + case 160: return rzfit_objc_string_from_tissue_model_type( (FIT_ENUM) val); + case 161: return rzfit_objc_string_from_dive_gas_status( (FIT_ENUM) val); + case 162: return rzfit_objc_string_from_dive_alert( (FIT_ENUM) val); + case 163: return rzfit_objc_string_from_dive_alarm_type( (FIT_ENUM) val); + case 164: return rzfit_objc_string_from_dive_backlight_mode( (FIT_ENUM) val); + case 165: return rzfit_objc_string_from_sleep_level( (FIT_ENUM) val); + case 166: return rzfit_objc_string_from_spo2_measurement_type( (FIT_ENUM) val); + case 167: return rzfit_objc_string_from_ccr_setpoint_switch_mode( (FIT_ENUM) val); + case 168: return rzfit_objc_string_from_dive_gas_mode( (FIT_ENUM) val); + case 169: return rzfit_objc_string_from_favero_product( (FIT_UINT16) val); + case 170: return rzfit_objc_string_from_split_type( (FIT_ENUM) val); + case 171: return rzfit_objc_string_from_climb_pro_event( (FIT_ENUM) val); + case 172: return rzfit_objc_string_from_gas_consumption_rate_type( (FIT_ENUM) val); + case 173: return rzfit_objc_string_from_tap_sensitivity( (FIT_ENUM) val); + case 174: return rzfit_objc_string_from_radar_threat_level_type( (FIT_ENUM) val); + case 175: return rzfit_objc_string_from_max_met_speed_source( (FIT_ENUM) val); + case 176: return rzfit_objc_string_from_max_met_heart_rate_source( (FIT_ENUM) val); + case 177: return rzfit_objc_string_from_hrv_status( (FIT_ENUM) val); + case 178: return rzfit_objc_string_from_no_fly_time_mode( (FIT_ENUM) val); default: return [NSString stringWithFormat:@"FIT_TYPE_%u_VALUE_%u", (unsigned int)fit_type, (unsigned int)val]; } } @@ -9453,9 +9810,13 @@ FIT_FIELD_INFO rzfit_objc_field_info( FIT_UINT16 global_mesg_num, FIT_UINT16 fie case 51: return rzfit_objc_field_info_for_blood_pressure(field); case 103: return rzfit_objc_field_info_for_monitoring_info(field); case 55: return rzfit_objc_field_info_for_monitoring(field,interp); + case 211: return rzfit_objc_field_info_for_monitoring_hr_data(field); + case 269: return rzfit_objc_field_info_for_spo2_data(field); case 132: return rzfit_objc_field_info_for_hr(field); case 227: return rzfit_objc_field_info_for_stress_level(field); + case 229: return rzfit_objc_field_info_for_max_met_data(field); case 145: return rzfit_objc_field_info_for_memo_glob(field); + case 275: return rzfit_objc_field_info_for_sleep_level(field); case 82: return rzfit_objc_field_info_for_ant_channel_id(field); case 80: return rzfit_objc_field_info_for_ant_rx(field); case 81: return rzfit_objc_field_info_for_ant_tx(field); @@ -9464,8 +9825,13 @@ FIT_FIELD_INFO rzfit_objc_field_info( FIT_UINT16 global_mesg_num, FIT_UINT16 fie case 202: return rzfit_objc_field_info_for_exd_data_concept_configuration(field); case 268: return rzfit_objc_field_info_for_dive_summary(field); case 78: return rzfit_objc_field_info_for_hrv(field); + case 290: return rzfit_objc_field_info_for_beat_intervals(field); + case 370: return rzfit_objc_field_info_for_hrv_status_summary(field); + case 371: return rzfit_objc_field_info_for_hrv_value(field); + case 297: return rzfit_objc_field_info_for_respiration_rate(field); case 319: return rzfit_objc_field_info_for_tank_update(field); case 323: return rzfit_objc_field_info_for_tank_summary(field); + case 346: return rzfit_objc_field_info_for_sleep_assessment(field); default: return (FIT_FIELD_INFO){.scale = 0, .offset = 0, .fit_type = 0, .fit_unit = 0, .fit_flag = 0 }; } } \ No newline at end of file diff --git a/Sources/FitFileParserObjc/rzfit_objc_reference_mesg.h b/Sources/FitFileParserObjc/rzfit_objc_reference_mesg.h index 1c0525b..2c3f1cf 100644 --- a/Sources/FitFileParserObjc/rzfit_objc_reference_mesg.h +++ b/Sources/FitFileParserObjc/rzfit_objc_reference_mesg.h @@ -86,19 +86,28 @@ typedef FIT_UINT16 FIT_MESG_NUM; #define FIT_MESG_NUM_MAGNETOMETER_DATA ((FIT_MESG_NUM)208) #define FIT_MESG_NUM_BAROMETER_DATA ((FIT_MESG_NUM)209) #define FIT_MESG_NUM_ONE_D_SENSOR_CALIBRATION ((FIT_MESG_NUM)210) +#define FIT_MESG_NUM_MONITORING_HR_DATA ((FIT_MESG_NUM)211) #define FIT_MESG_NUM_TIME_IN_ZONE ((FIT_MESG_NUM)216) #define FIT_MESG_NUM_SET ((FIT_MESG_NUM)225) #define FIT_MESG_NUM_STRESS_LEVEL ((FIT_MESG_NUM)227) +#define FIT_MESG_NUM_MAX_MET_DATA ((FIT_MESG_NUM)229) #define FIT_MESG_NUM_DIVE_SETTINGS ((FIT_MESG_NUM)258) #define FIT_MESG_NUM_DIVE_GAS ((FIT_MESG_NUM)259) #define FIT_MESG_NUM_DIVE_ALARM ((FIT_MESG_NUM)262) #define FIT_MESG_NUM_EXERCISE_TITLE ((FIT_MESG_NUM)264) #define FIT_MESG_NUM_DIVE_SUMMARY ((FIT_MESG_NUM)268) +#define FIT_MESG_NUM_SPO2_DATA ((FIT_MESG_NUM)269) +#define FIT_MESG_NUM_SLEEP_LEVEL ((FIT_MESG_NUM)275) #define FIT_MESG_NUM_JUMP ((FIT_MESG_NUM)285) +#define FIT_MESG_NUM_BEAT_INTERVALS ((FIT_MESG_NUM)290) +#define FIT_MESG_NUM_RESPIRATION_RATE ((FIT_MESG_NUM)297) #define FIT_MESG_NUM_SPLIT ((FIT_MESG_NUM)312) #define FIT_MESG_NUM_CLIMB_PRO ((FIT_MESG_NUM)317) #define FIT_MESG_NUM_TANK_UPDATE ((FIT_MESG_NUM)319) #define FIT_MESG_NUM_TANK_SUMMARY ((FIT_MESG_NUM)323) +#define FIT_MESG_NUM_SLEEP_ASSESSMENT ((FIT_MESG_NUM)346) +#define FIT_MESG_NUM_HRV_STATUS_SUMMARY ((FIT_MESG_NUM)370) +#define FIT_MESG_NUM_HRV_VALUE ((FIT_MESG_NUM)371) #define FIT_MESG_NUM_DEVICE_AUX_BATTERY_INFO ((FIT_MESG_NUM)375) #define FIT_MESG_NUM_DIVE_APNEA_ALARM ((FIT_MESG_NUM)393) #define FIT_MESG_NUM_MFG_RANGE_MIN ((FIT_MESG_NUM)0xFF00) @@ -391,6 +400,8 @@ typedef struct { FIT_SINT32 nec_long; // FIT_SINT32 swc_lat; // FIT_SINT32 swc_long; // + FIT_SINT32 end_position_lat; // + FIT_SINT32 end_position_long; // FIT_UINT32 avg_stroke_count; // FIT_UINT32 total_work; // FIT_UINT32 total_moving_time; // @@ -399,6 +410,7 @@ typedef struct { FIT_UINT32 time_in_cadence_zone[1]; // FIT_UINT32 time_in_power_zone[1]; // FIT_UINT32 avg_lap_time; // + FIT_STRING sport_profile_name[16]; // FIT_UINT32 enhanced_avg_speed; // FIT_UINT32 enhanced_max_speed; // FIT_UINT32 enhanced_avg_altitude; // @@ -910,6 +922,7 @@ typedef struct { typedef struct { FIT_UINT32Z capabilities; // workout_capabilities FIT_STRING wkt_name[16]; // + FIT_UINT16 message_index; // message_index FIT_UINT16 num_valid_steps; // FIT_UINT16 pool_length; // FIT_ENUM sport; // sport @@ -986,6 +999,7 @@ typedef struct { FIT_UINT16 basal_met; // FIT_UINT16 active_met; // FIT_UINT16 user_profile_index; // message_index + FIT_UINT16 bmi; // FIT_UINT8 physique_rating; // FIT_UINT8 metabolic_age; // FIT_UINT8 visceral_fat_rating; // @@ -1025,6 +1039,12 @@ typedef struct { FIT_ENUM activity_subtype; // activity_subtype } FIT_MONITORING_MESG; +typedef struct { + FIT_UINT32 timestamp; // + FIT_UINT8 resting_heart_rate; // + FIT_UINT8 current_day_resting_heart_rate; // +} FIT_MONITORING_HR_DATA_MESG; + typedef struct { FIT_UINT32 timestamp; // FIT_UINT32 event_timestamp[1]; // diff --git a/Sources/FitFileParserObjc/rzfit_objc_reference_mesg.m b/Sources/FitFileParserObjc/rzfit_objc_reference_mesg.m index 3e86534..4f62c03 100644 --- a/Sources/FitFileParserObjc/rzfit_objc_reference_mesg.m +++ b/Sources/FitFileParserObjc/rzfit_objc_reference_mesg.m @@ -573,107 +573,110 @@ FIT_UINT8 arch; FIT_UINT16 global_mesg_num; FIT_UINT8 num_fields; - FIT_UINT8 fields[FIT_FIELD_DEF_SIZE * 92]; + FIT_UINT8 fields[FIT_FIELD_DEF_SIZE * 95]; } FIT_SESSION_MESG_DEF; static const FIT_SESSION_MESG_DEF session_mesg_def = { 0, // reserved_1 FIT_ARCH_ENDIAN, // arch, /* session */18, // mesg_num, - 92, - { - /* timestamp */253, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* start_time */2, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* start_position_lat */3, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, - /* start_position_long */4, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, - /* total_elapsed_time */7, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* total_timer_time */8, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* total_distance */9, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* total_cycles */10, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* nec_lat */29, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, - /* nec_long */30, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, - /* swc_lat */31, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, - /* swc_long */32, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, - /* avg_stroke_count */41, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* total_work */48, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* total_moving_time */59, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* time_in_hr_zone */65, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* time_in_speed_zone */66, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* time_in_cadence_zone */67, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* time_in_power_zone */68, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* avg_lap_time */69, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* enhanced_avg_speed */124, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* enhanced_max_speed */125, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* enhanced_avg_altitude */126, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* enhanced_min_altitude */127, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* enhanced_max_altitude */128, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, - /* message_index */254, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* total_calories */11, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* total_fat_calories */13, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_speed */14, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* max_speed */15, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_power */20, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* max_power */21, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* total_ascent */22, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* total_descent */23, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* first_lap_index */25, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* num_laps */26, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* num_lengths */33, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* normalized_power */34, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* training_stress_score */35, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* intensity_factor */36, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* left_right_balance */37, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_stroke_distance */42, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* pool_length */44, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* threshold_power */45, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* num_active_lengths */47, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_altitude */49, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* max_altitude */50, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_grade */52, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, - /* avg_pos_grade */53, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, - /* avg_neg_grade */54, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, - /* max_pos_grade */55, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, - /* max_neg_grade */56, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, - /* avg_pos_vertical_speed */60, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, - /* avg_neg_vertical_speed */61, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, - /* max_pos_vertical_speed */62, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, - /* max_neg_vertical_speed */63, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, - /* best_lap_index */70, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* min_altitude */71, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* player_score */82, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* opponent_score */83, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* stroke_count */85, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* zone_count */86, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* max_ball_speed */87, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_ball_speed */88, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_vertical_oscillation */89, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_stance_time_percent */90, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_stance_time */91, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* avg_vam */139, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, - /* event */0, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, - /* event_type */1, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, - /* sport */5, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, - /* sub_sport */6, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, - /* avg_heart_rate */16, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* max_heart_rate */17, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* avg_cadence */18, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* max_cadence */19, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* total_training_effect */24, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* event_group */27, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* trigger */28, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, - /* swim_stroke */43, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, - /* pool_length_unit */46, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, - /* gps_accuracy */51, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* avg_temperature */57, (sizeof(FIT_SINT8)*1), FIT_BASE_TYPE_SINT8, - /* max_temperature */58, (sizeof(FIT_SINT8)*1), FIT_BASE_TYPE_SINT8, - /* min_heart_rate */64, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* opponent_name */84, (sizeof(FIT_STRING)*1), FIT_BASE_TYPE_STRING, - /* avg_fractional_cadence */92, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* max_fractional_cadence */93, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* total_fractional_cycles */94, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* sport_index */111, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* total_anaerobic_training_effect */137, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, - /* min_temperature */150, (sizeof(FIT_SINT8)*1), FIT_BASE_TYPE_SINT8, + 95, + { + /* timestamp */253, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* start_time */2, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* start_position_lat */3, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, + /* start_position_long */4, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, + /* total_elapsed_time */7, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* total_timer_time */8, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* total_distance */9, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* total_cycles */10, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* nec_lat */29, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, + /* nec_long */30, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, + /* swc_lat */31, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, + /* swc_long */32, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, + /* end_position_lat */38, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, + /* end_position_long */39, (sizeof(FIT_SINT32)*1), FIT_BASE_TYPE_SINT32, + /* avg_stroke_count */41, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* total_work */48, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* total_moving_time */59, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* time_in_hr_zone */65, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* time_in_speed_zone */66, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* time_in_cadence_zone */67, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* time_in_power_zone */68, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* avg_lap_time */69, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* sport_profile_name */110, (sizeof(FIT_STRING)*16), FIT_BASE_TYPE_STRING, + /* enhanced_avg_speed */124, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* enhanced_max_speed */125, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* enhanced_avg_altitude */126, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* enhanced_min_altitude */127, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* enhanced_max_altitude */128, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* message_index */254, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* total_calories */11, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* total_fat_calories */13, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_speed */14, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* max_speed */15, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_power */20, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* max_power */21, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* total_ascent */22, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* total_descent */23, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* first_lap_index */25, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* num_laps */26, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* num_lengths */33, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* normalized_power */34, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* training_stress_score */35, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* intensity_factor */36, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* left_right_balance */37, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_stroke_distance */42, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* pool_length */44, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* threshold_power */45, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* num_active_lengths */47, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_altitude */49, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* max_altitude */50, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_grade */52, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, + /* avg_pos_grade */53, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, + /* avg_neg_grade */54, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, + /* max_pos_grade */55, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, + /* max_neg_grade */56, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, + /* avg_pos_vertical_speed */60, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, + /* avg_neg_vertical_speed */61, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, + /* max_pos_vertical_speed */62, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, + /* max_neg_vertical_speed */63, (sizeof(FIT_SINT16)*1), FIT_BASE_TYPE_SINT16, + /* best_lap_index */70, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* min_altitude */71, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* player_score */82, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* opponent_score */83, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* stroke_count */85, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* zone_count */86, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* max_ball_speed */87, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_ball_speed */88, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_vertical_oscillation */89, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_stance_time_percent */90, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_stance_time */91, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* avg_vam */139, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* event */0, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, + /* event_type */1, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, + /* sport */5, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, + /* sub_sport */6, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, + /* avg_heart_rate */16, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* max_heart_rate */17, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* avg_cadence */18, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* max_cadence */19, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* total_training_effect */24, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* event_group */27, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* trigger */28, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, + /* swim_stroke */43, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, + /* pool_length_unit */46, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, + /* gps_accuracy */51, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* avg_temperature */57, (sizeof(FIT_SINT8)*1), FIT_BASE_TYPE_SINT8, + /* max_temperature */58, (sizeof(FIT_SINT8)*1), FIT_BASE_TYPE_SINT8, + /* min_heart_rate */64, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* opponent_name */84, (sizeof(FIT_STRING)*1), FIT_BASE_TYPE_STRING, + /* avg_fractional_cadence */92, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* max_fractional_cadence */93, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* total_fractional_cycles */94, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* sport_index */111, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* total_anaerobic_training_effect */137, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* min_temperature */150, (sizeof(FIT_SINT8)*1), FIT_BASE_TYPE_SINT8, } }; typedef struct { @@ -1414,17 +1417,18 @@ FIT_UINT8 arch; FIT_UINT16 global_mesg_num; FIT_UINT8 num_fields; - FIT_UINT8 fields[FIT_FIELD_DEF_SIZE * 7]; + FIT_UINT8 fields[FIT_FIELD_DEF_SIZE * 8]; } FIT_WORKOUT_MESG_DEF; static const FIT_WORKOUT_MESG_DEF workout_mesg_def = { 0, // reserved_1 FIT_ARCH_ENDIAN, // arch, /* workout */26, // mesg_num, - 7, + 8, { /* capabilities */5, (sizeof(FIT_UINT32Z)*1), FIT_BASE_TYPE_UINT32Z, /* wkt_name */8, (sizeof(FIT_STRING)*16), FIT_BASE_TYPE_STRING, + /* message_index */254, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, /* num_valid_steps */6, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, /* pool_length */14, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, /* sport */4, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, @@ -1560,14 +1564,14 @@ FIT_UINT8 arch; FIT_UINT16 global_mesg_num; FIT_UINT8 num_fields; - FIT_UINT8 fields[FIT_FIELD_DEF_SIZE * 13]; + FIT_UINT8 fields[FIT_FIELD_DEF_SIZE * 14]; } FIT_WEIGHT_SCALE_MESG_DEF; static const FIT_WEIGHT_SCALE_MESG_DEF weight_scale_mesg_def = { 0, // reserved_1 FIT_ARCH_ENDIAN, // arch, /* weight_scale */30, // mesg_num, - 13, + 14, { /* timestamp */253, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, /* weight */0, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, @@ -1579,6 +1583,7 @@ /* basal_met */7, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, /* active_met */9, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, /* user_profile_index */12, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, + /* bmi */13, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, /* physique_rating */8, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, /* metabolic_age */10, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, /* visceral_fat_rating */11, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, @@ -1657,6 +1662,25 @@ /* activity_subtype */6, (sizeof(FIT_ENUM)*1), FIT_BASE_TYPE_ENUM, } }; +typedef struct { + FIT_UINT8 reserved_1; + FIT_UINT8 arch; + FIT_UINT16 global_mesg_num; + FIT_UINT8 num_fields; + FIT_UINT8 fields[FIT_FIELD_DEF_SIZE * 3]; +} FIT_MONITORING_HR_DATA_MESG_DEF; + +static const FIT_MONITORING_HR_DATA_MESG_DEF monitoring_hr_data_mesg_def = { + 0, // reserved_1 + FIT_ARCH_ENDIAN, // arch, + /* monitoring_hr_data */211, // mesg_num, + 3, + { + /* timestamp */253, (sizeof(FIT_UINT32)*1), FIT_BASE_TYPE_UINT32, + /* resting_heart_rate */0, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + /* current_day_resting_heart_rate */1, (sizeof(FIT_UINT8)*1), FIT_BASE_TYPE_UINT8, + } +}; typedef struct { FIT_UINT8 reserved_1; FIT_UINT8 arch; @@ -1809,7 +1833,7 @@ /* time */0, (sizeof(FIT_UINT16)*1), FIT_BASE_TYPE_UINT16, } }; -FIT_UINT8 reference_mesg_defs_size = 65; +FIT_UINT8 reference_mesg_defs_size = 66; FIT_CONST_MESG_DEF_PTR reference_mesg_defs[] = { (FIT_CONST_MESG_DEF_PTR) &file_id_mesg_def, (FIT_CONST_MESG_DEF_PTR) &file_creator_mesg_def, @@ -1869,6 +1893,7 @@ (FIT_CONST_MESG_DEF_PTR) &blood_pressure_mesg_def, (FIT_CONST_MESG_DEF_PTR) &monitoring_info_mesg_def, (FIT_CONST_MESG_DEF_PTR) &monitoring_mesg_def, + (FIT_CONST_MESG_DEF_PTR) &monitoring_hr_data_mesg_def, (FIT_CONST_MESG_DEF_PTR) &hr_mesg_def, (FIT_CONST_MESG_DEF_PTR) &ant_rx_mesg_def, (FIT_CONST_MESG_DEF_PTR) &ant_tx_mesg_def, diff --git a/python/Profile.xlsx b/python/Profile.xlsx index b0694e6..3587b30 100644 Binary files a/python/Profile.xlsx and b/python/Profile.xlsx differ diff --git a/python/fitsdkversion.txt b/python/fitsdkversion.txt index 7c95347..2a00d71 100644 --- a/python/fitsdkversion.txt +++ b/python/fitsdkversion.txt @@ -1 +1 @@ -21.105 \ No newline at end of file +21.115 \ No newline at end of file