Class: Toybox.AntPlus.BikeLight

Overview

A class representing a bike light sensor.

Since:

API Level 2.2.0

Supported Devices:

Instance Member Summary collapse

Instance Method Summary collapse

Instance Attribute Details

var mode as AntPlus.LightMode

The LIGHT_MODE_* mode of the light.

Since:

API Level 2.2.0

Returns:

var type as AntPlus.LightType

The LIGHT_TYPE_* type of the light.

Since:

API Level 2.2.0

Returns:

Instance Method Details

getCapableModes() as Lang.Array<AntPlus.LightMode> or Null

Get a list of the standard and custom light modes that a bike light supports.

Returns:

  • Lang.Array

    list of supported LIGHT_MODE_* values, null if unknown

Since:

API Level 2.2.0

initialize()

Constructor

Since:

API Level 2.2.0

setMode(mode as AntPlus.LightMode) as Void

Tell this light to enter a new mode.

You should check the capable modes before sending light modes as lights will ignore commands to go into modes that they do not support. Lights whose modes are set here will not be controlled by the Light Network Mode until they are restored OR until the user changes the Light Network Mode outside of ConnectIQ.

Parameters:

  • mode(Lang.Number)

    The LIGHT_MODE* enum number value

Since:

API Level 2.2.0


Generated Apr 17, 2024 9:40:40 AM