Class: Toybox.AntPlus.BikeLight
- Inherits:
-
Toybox.AntPlus.CommonData
Overview
A class representing a bike light sensor.
Instance Member Summary collapse
-
mode as AntPlus.LightMode
The LIGHT_MODE_* mode of the light.
-
type as AntPlus.LightType
The LIGHT_TYPE_* type of the light.
Instance Method Summary collapse
-
getCapableModes() as Lang.Array<AntPlus.LightMode> or Null
Get a list of the standard and custom light modes that a bike light supports.
-
initialize()
Constructor.
-
setMode(mode as AntPlus.LightMode) as Void
Tell this light to enter a new mode.
Instance Attribute Details
var mode as AntPlus.LightMode
The LIGHT_MODE_* mode of the light.
var type as AntPlus.LightType
The LIGHT_TYPE_* type of the light.
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.
initialize()
Constructor
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.