Class: Toybox.FitContributor.Field

Overview

A Field records custom FIT data from an Application or Data Field to a FIT file on the device's file system.

Once a Field is created with the createField() method, you can submit the next Field value with setData(), which will get written to the FIT file at the next opportunity. Depending on the device, writes to the FIT file may occur once per second or when new data is available (Smart Recording). Best practice is to only call setData() when values have changed to accommodate Smart Recording.

If setData() is called before the previous data is written out, the previous value will be lost and replaced by the current data. For this reason, we do not recommend using this feature for time-sensitive data requiring sub-second granularity.

See Also:

Since:

API Level 1.3.0

Instance Method Summary collapse

Instance Method Details

setData(input as Lang.Object) as Void

Set the value to write to this Field.

Parameters:

  • input(Lang.Object)

    The data to be written to the Field

Since:

API Level 1.3.0

Throws:


Generated Dec 11, 2024, 8:58:43 AM