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, sendManufacturerMessage, sendPageRequest

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


17717
17718
# File 'Monkeybrains.rb', line 17717

def initialize(listener)
end

Instance Method Details

getSpeedInfoBikeSpeedInfo

getSpeedInfo - Returns the most recent BikeSpeedInfo

Returns:

Since:

  • 3.0.0


17723
17724
# File 'Monkeybrains.rb', line 17723

def getSpeedInfo()
end