Skip to content

Commit

Permalink
updated for sdk version 21.60
Browse files Browse the repository at this point in the history
  • Loading branch information
roznet committed Sep 15, 2021
1 parent d317650 commit f142941
Show file tree
Hide file tree
Showing 6 changed files with 185 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ All the required code is auto generated by running a python script `fitsdkparser

## Update for a new SDK

When a new SDK is available, after download, you can copy the new `Profile.xlsx`.
When a new SDK is available, after download, you can copy the new `Profile.xlsx` into the `python` directory and edit the file `fitsdkversion.txt` with the version used.

You need to then run the `fitsdkparser.py` script that will automatically update the swift code for the latest version of the sdk

Expand Down
48 changes: 46 additions & 2 deletions Sources/FitFileParser/rzfit_swift_map.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import FitFileParserObjc

extension FitFile {
public static let sdkVersion = "21.47"
public static let sdkVersion = "21.60"
}

//MARK: - Module Entry Point Functions
Expand Down Expand Up @@ -703,6 +703,9 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri
case "avg_flow": return "Flow"
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"
Expand Down Expand Up @@ -766,6 +769,7 @@ func rzfit_swift_unit_for_field( mesg_num : FIT_UINT16, field : String ) -> Stri
case "ebike_battery_level": return "percent"
case "ebike_assist_mode": return "depends on sensor"
case "ebike_assist_level_percent": return "percent"
case "core_temperature": return "C"
case "battery_level": return "V"
case "virtual_partner_speed": return "m/s"
case "hr_high_alert": return "bpm"
Expand Down Expand Up @@ -2013,6 +2017,7 @@ fileprivate func rzfit_swift_string_from_sub_sport(_ input : FIT_ENUM) -> String
case 57: return "apnea_hunting"
case 58: return "virtual_activity"
case 59: return "obstacle"
case 65: return "sail_race"
case 254: return "all"
default: return "sub_sport_\(input)"
}
Expand Down Expand Up @@ -2456,6 +2461,7 @@ fileprivate func rzfit_swift_string_from_manufacturer(_ input : FIT_UINT16) -> S
case 38: return "osynce"
case 39: return "holux"
case 40: return "concept2"
case 41: return "shimano"
case 42: return "one_giant_leap"
case 43: return "ace_sensor"
case 44: return "brim_brothers"
Expand Down Expand Up @@ -2547,6 +2553,7 @@ fileprivate func rzfit_swift_string_from_manufacturer(_ input : FIT_UINT16) -> S
case 132: return "cycplus"
case 133: return "gravaa_byte"
case 134: return "sigeyi"
case 135: return "coospo"
case 255: return "development"
case 257: return "healthandlife"
case 258: return "lezyne"
Expand Down Expand Up @@ -2602,6 +2609,7 @@ fileprivate func rzfit_swift_string_from_manufacturer(_ input : FIT_UINT16) -> S
case 308: return "monark_exercise"
case 309: return "form"
case 310: return "decathlon"
case 311: return "syncros"
case 5759: return "actigraphcorp"
default: return "manufacturer_\(input)"
}
Expand Down Expand Up @@ -2764,6 +2772,7 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) ->
case 2362: return "vivo_smart_gps_hr_asia"
case 2368: return "vivo_move"
case 2379: return "varia_taillight"
case 2396: return "fr235_asia"
case 2397: return "fr235_japan"
case 2398: return "varia_vision"
case 2406: return "vivo_fit3"
Expand Down Expand Up @@ -2815,6 +2824,7 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) ->
case 2769: return "foretrex_601_701"
case 2772: return "vivo_move_hr"
case 2713: return "edge_1030"
case 2787: return "vector_3"
case 2796: return "fenix5_asia"
case 2797: return "fenix5s_asia"
case 2798: return "fenix5x_asia"
Expand All @@ -2825,6 +2835,7 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) ->
case 2832: return "vivo_sport_apac"
case 2833: return "fr935_asia"
case 2859: return "descent"
case 2878: return "vivo_fit4"
case 2886: return "fr645"
case 2888: return "fr645m"
case 2891: return "fr30"
Expand Down Expand Up @@ -2871,12 +2882,14 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) ->
case 3250: return "marq_expedition"
case 3251: return "marq_athlete"
case 3258: return "descent_mk2"
case 3284: return "gpsmap66i"
case 3287: return "fenix6S_sport"
case 3288: return "fenix6S"
case 3289: return "fenix6_sport"
case 3290: return "fenix6"
case 3291: return "fenix6x"
case 3299: return "hrm_dual"
case 3300: return "hrm_pro"
case 3308: return "vivo_move3_premium"
case 3314: return "approach_s40"
case 3321: return "fr245m_asia"
Expand All @@ -2898,28 +2911,52 @@ fileprivate func rzfit_swift_string_from_garmin_product(_ input : FIT_UINT16) ->
case 3451: return "marq_athlete_asia"
case 3469: return "fr45_asia"
case 3473: return "vivoactive3_daimler"
case 3498: return "legacy_rey"
case 3499: return "legacy_darth_vader"
case 3500: return "legacy_captain_marvel"
case 3501: return "legacy_first_avenger"
case 3512: return "fenix6s_sport_asia"
case 3513: return "fenix6s_asia"
case 3514: return "fenix6_sport_asia"
case 3515: return "fenix6_asia"
case 3516: return "fenix6x_asia"
case 3535: return "legacy_captain_marvel_asia"
case 3536: return "legacy_first_avenger_asia"
case 3537: return "legacy_rey_asia"
case 3538: return "legacy_darth_vader_asia"
case 3542: return "descent_mk2s"
case 3558: return "edge_130_plus"
case 3570: return "edge_1030_plus"
case 3578: return "rally_200"
case 3589: return "fr745"
case 3600: return "venusq"
case 3615: return "lily"
case 3624: return "marq_adventurer"
case 3638: return "enduro"
case 3648: return "marq_adventurer_asia"
case 3639: return "swim2_apac"
case 3702: return "descent_mk2_asia"
case 3703: return "venu2"
case 3704: return "venu2s"
case 3737: return "venu_daimler_asia"
case 3739: return "marq_golfer"
case 3740: return "venu_daimler"
case 3794: return "fr745_asia"
case 3809: return "lily_asia"
case 3812: return "edge_1030_plus_asia"
case 3813: return "edge_130_plus_asia"
case 3823: return "approach_s12"
case 3872: return "enduro_asia"
case 3837: return "venusq_asia"
case 3850: return "marq_golfer_asia"
case 3851: return "venu2plus"
case 3927: return "approach_g12"
case 3930: return "descent_mk2s_asia"
case 3934: return "approach_s42"
case 3949: return "venu2s_asia"
case 3950: return "venu2_asia"
case 3986: return "approach_S12_asia"
case 4001: return "approach_g12_asia"
case 4002: return "approach_s42_asia"
case 10007: return "sdm4"
case 10014: return "edge_remote"
case 20533: return "tacx_training_app_win"
Expand Down Expand Up @@ -6267,6 +6304,9 @@ fileprivate func rzfit_swift_field_num_to_string_for_session( field_num : FIT_UI
case 187: return "avg_flow"
case 199: return "total_fractional_ascent"
case 200: return "total_fractional_descent"
case 208: return "avg_core_temperature"
case 209: return "min_core_temperature"
case 210: return "max_core_temperature"
default: return "session_field_num_\(field_num)"
}
}
Expand Down Expand Up @@ -6410,6 +6450,9 @@ fileprivate func rzfit_swift_field_num_to_string_for_lap( field_num : FIT_UINT16
case 154: return "avg_flow"
case 156: return "total_fractional_ascent"
case 157: return "total_fractional_descent"
case 158: return "avg_core_temperature"
case 159: return "min_core_temperature"
case 160: return "max_core_temperature"
default: return "lap_field_num_\(field_num)"
}
}
Expand Down Expand Up @@ -6511,6 +6554,7 @@ fileprivate func rzfit_swift_field_num_to_string_for_record( field_num : FIT_UIN
case 118: return "ebike_battery_level"
case 119: return "ebike_assist_mode"
case 120: return "ebike_assist_level_percent"
case 139: return "core_temperature"
default: return "record_field_num_\(field_num)"
}
}
Expand Down
Loading

0 comments on commit f142941

Please sign in to comment.