Class: Toybox::FitContributor::Field

Inherits:
Lang::Object show all

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.

Instance Method Summary collapse

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Instance Method Details

setData(input) ⇒ Object

Set the value to write to this Field.

Parameters:

Raises:

Since:

  • 1.3.0


4665
4666
# File 'Monkeybrains.rb', line 4665

def setData(input)
end