Class: Toybox::AntPlus::BikeCadence

Inherits:
Device show all

Overview

Represents a Bike Cadence Device instance.

Examples:

using Toybox.AntPlus;

// Assuming Valid BikeCadenceListener object "MyBikeCadenceListener"

// Initialize the AntPlus.BikeCadenceListener object
listener = new MyBikeCadenceListener();

// Initialize the AntPlus.BikeCadence object with a listener
bikeCadence = new AntPlus.BikeCadence(listener);

var cadenceInfo = bikeCadence.getCadenceInfo();

// ...etc

Since:

  • 3.0.0

Device States collapse

Methods inherited from Device

getBatteryStatus, getComponentIdentifiers, getDeviceState, getManufacturerInfo, getProductInfo, sendManufacturerMessage, sendPageRequest

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Constructor Details

initialize(listener) ⇒ BikeCadence

The initializer for the device object takes an extension of the BikeCadenceListener class as a parameter. null can be passed in instead if the user plans to only poll for data using the getCadenceInfo method.

Parameters:

Since:

  • 3.0.0


16841
16842
# File 'Monkeybrains.rb', line 16841

def initialize(listener)
end

Instance Method Details

getCadenceInfoBikeCadenceInfo

getCadenceInfo - Returns the most recent BikeCadenceInfo

Returns:

Since:

  • 3.0.0


16847
16848
# File 'Monkeybrains.rb', line 16847

def getCadenceInfo()
end