Class: Toybox::AntPlus::BikeSpeed

Inherits:
Device show all

Overview

Represents a Bike Speed Device instance.

Examples:

using Toybox.AntPlus;

// Assuming Valid BikeSpeedListener object "MyBikeSpeedListener"

// Initialize the AntPlus.BikeSpeedListener object
listener = new MyBikeSpeedListener();

// Initialize the AntPlus.BikeSpeed object with a listener
bikeSpeed = new AntPlus.BikeSpeed(listener);

var speedInfo = bikeSpeed.getSpeedInfo();

// ...etc

Since:

  • 3.0.0

Radar Threat Side collapse

Methods inherited from Device

getBatteryStatus, getComponentIdentifiers, getDeviceState, getManufacturerInfo, getProductInfo

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Constructor Details

initialize(listener) ⇒ BikeSpeed

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

Parameters:

Since:

  • 3.0.0


15983
15984
# File 'Monkeybrains.rb', line 15983

def initialize(listener)
end

Instance Method Details

getSpeedInfoBikeSpeedInfo

getSpeedInfo - Returns the most recent BikeSpeedInfo

Returns:

Since:

  • 3.0.0


15989
15990
# File 'Monkeybrains.rb', line 15989

def getSpeedInfo()
end