| 1 |
|
| 2 |
FITmetadata.json generator |
| 3 |
|
| 4 |
For Garmin device updates: |
| 5 |
|
| 6 |
Make sure you download the latest FIT SDK from https://developer.garmin.com/fit/download/ |
| 7 |
and extract the c/fit_example.h file and place it in this directory. |
| 8 |
|
| 9 |
Do not edit this file, we expect it to be lifted directly from the SDK |
| 10 |
and it will be replaced as new versions of the SDK are released |
| 11 |
|
| 12 |
For Garmin profile updates: |
| 13 |
|
| 14 |
The fields.json file in this directory is metadata describing most of the standard |
| 15 |
fields and is based upon the Profile.xls file in the SDK. If new fields are or profiles |
| 16 |
are added and you want them to be parsed via metadata then update fields.json to |
| 17 |
include the entries. |
| 18 |
|
| 19 |
At present the FIT ride file reader code is a mix of hard coded parsing for |
| 20 |
the majority of the message types, but the code for parsing session and lap |
| 21 |
message types does use the metadata to control parsing (and puts the results |
| 22 |
into the XDATA section of a ridefile) |
| 23 |
|
| 24 |
If you add new profile then you should use metadata to drive the parsing and |
| 25 |
add the data to the XDATA section to avoid impacting existing code. |
| 26 |
|
| 27 |
Generate a new FITmetadata.json file |
| 28 |
|
| 29 |
There is a Makefile in this directory that will refresh baed upon the timestamp |
| 30 |
of the fit_example.h. To refresh simply run 'make'. If you wish to re-run and |
| 31 |
regenerate 'touch fit_example.h; make' will do that. |
| 32 |
|
| 33 |
You will need python3 installed since the generator is a python script. Please |
| 34 |
do not edit this script but raise a github issue if you find it is broken. |
| 35 |
|
| 36 |
When Garmin devices are not yet supported by the SDK |
| 37 |
|
| 38 |
The SDK lags behind device availability in this case you should add |
| 39 |
the Garmin device to the nongarmin.json file, this will override any |
| 40 |
value found in the Garmin SDK and is typically because a device is |
| 41 |
reported by a user at the forums before the SDK is updated or is a |
| 42 |
legacy device that Garmin no longer supports. |
| 43 |
|
| 44 |
For non-Garmin device updates: |
| 45 |
|
| 46 |
Update the file nongarmin.json to add the manufacturer and product combination |
| 47 |
and associated description. See existing values in there as examples. Note |
| 48 |
that a product number of -1 is to set the default description for any device |
| 49 |
from that manufacturer that is not defined |
| 50 |
|
| 51 |
|
| 52 |
Once the updates have been made you can regenerate FITmetadata.json with: |
| 53 |
$ make |
| 54 |
|
| 55 |
A new FITmetadata.json file will be created in the src/Resources/json directory, |
| 56 |
|