Module: Toybox.FitContributor
Overview
The FitContributor module allows Applications and Data Fields to record Field data into FIT files on the device's file system during an activity. This is useful for recording data that is not already calculated by the device, which can be synced to a service like Garmin Connect.
There are three FitContributor message types available:
- MESG_TYPE_SESSION
-
Session data is written once per recording session at the end of the recording, and is used for data that pertains to the entire session (e.g. average speed).
- MESG_TYPE_LAP
-
Lap data is written once for every lap in the session, and used for data that pertains to each lap (e.g. average lap speed).
- MESG_TYPE_RECORD
-
Depending on the device, record data is written once per second or when new data is available (Smart Recording), but is never written faster than once per second. This message type is used for instantaneous values (e.g. current speed).
Data type constants are also available for use with the createField() method.
See Also:
Classes Under Namespace
Classes: Field
Constant Summary
-
MessageType
-
DataType
Name | Value | Since | Description | See Also |
---|---|---|---|---|
MESG_TYPE_SESSION | 18 | API Level 1.3.0 |
The message type for session messages. |
|
MESG_TYPE_LAP | 19 | API Level 1.3.0 |
The message type for lap messages. |
|
MESG_TYPE_RECORD | 20 | API Level 1.3.0 |
The message type for record messages. |
Name | Value | Since | Description | See Also |
---|---|---|---|---|
DATA_TYPE_SINT8 | 1 | API Level 1.3.0 |
||
DATA_TYPE_UINT8 | 2 | API Level 1.3.0 |
||
DATA_TYPE_SINT16 | 3 | API Level 1.3.0 |
||
DATA_TYPE_UINT16 | 4 | API Level 1.3.0 |
||
DATA_TYPE_SINT32 | 5 | API Level 1.3.0 |
||
DATA_TYPE_UINT32 | 6 | API Level 1.3.0 |
||
DATA_TYPE_STRING | 7 | API Level 1.3.0 |
||
DATA_TYPE_FLOAT | 8 | API Level 1.3.0 |
||
DATA_TYPE_DOUBLE | 9 | API Level 1.3.0 |