Class: Toybox::AntPlus::BikeLight

Inherits:
CommonData show all

Overview

A class representing a bike light sensor.

Since:

  • 2.2.0

Light Type collapse

Attributes inherited from CommonData

identifier, numComponents

Light Type collapse

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Constructor Details

initializeBikeLight

Constructor.

Since:

  • 2.2.0


15217
15218
# File 'Monkeybrains.rb', line 15217

def initialize()
end

Instance Attribute Details

modeToybox::Lang::Number

The LIGHT_MODE_* mode of the light.

Returns:

Since:

  • 2.2.0


15228
15229
15230
# File 'Monkeybrains.rb', line 15228

def mode
  @mode
end

typeToybox::Lang::Number

The LIGHT_TYPE_* type of the light.

Returns:

Since:

  • 2.2.0


15223
15224
15225
# File 'Monkeybrains.rb', line 15223

def type
  @type
end

Instance Method Details

getCapableModesToybox::Lang::Array

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

Returns:

Since:

  • 2.2.0


15234
15235
# File 'Monkeybrains.rb', line 15234

def getCapableModes()
end

setMode(mode) ⇒ Object

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:

Since:

  • 2.2.0


15247
15248
# File 'Monkeybrains.rb', line 15247

def setMode(mode)
end