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


17026
17027
# File 'Monkeybrains.rb', line 17026

def initialize()
end

Instance Attribute Details

modeToybox::Lang::Number

The LIGHT_MODE_* mode of the light.

Returns:

Since:

  • 2.2.0


17037
17038
17039
# File 'Monkeybrains.rb', line 17037

def mode
  @mode
end

typeToybox::Lang::Number

The LIGHT_TYPE_* type of the light.

Returns:

Since:

  • 2.2.0


17032
17033
17034
# File 'Monkeybrains.rb', line 17032

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


17043
17044
# File 'Monkeybrains.rb', line 17043

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


17056
17057
# File 'Monkeybrains.rb', line 17056

def setMode(mode)
end