Class: Toybox::FitContributor::Field

Lang::Object show all


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.




  • 1.3.0

# File 'Monkeybrains.rb', line 5578

def setData(input)