Module: Toybox::AntPlus

Overview

The AntPlus module contains the interface for ANT+ data.

Since:

  • 2.4.0

Defined Under Namespace

Classes: BatteryStatus, BikeCadence, BikeCadenceInfo, BikeCadenceListener, BikeLight, BikePower, BikePowerListener, BikeRadar, BikeRadarListener, BikeSpeed, BikeSpeedCadence, BikeSpeedCadenceInfo, BikeSpeedCadenceListener, BikeSpeedInfo, BikeSpeedListener, CalculatedCadence, CalculatedPower, CalculatedWheelDistance, CalculatedWheelSpeed, CommonData, Device, DeviceListener, DeviceState, FitnessEquipment, FitnessEquipmentData, FitnessEquipmentListener, FitnessEquipmentMode, LightNetwork, LightNetworkListener, ManufacturerInfo, PedalPowerBalance, ProductInfo, RadarTarget, ResistanceSettings, RunningDynamics, RunningDynamicsData, RunningDynamicsListener, SensorPosition, SimulationSettings, TargetPowerSettings, TorqueEffectivenessPedalSmoothness, UserSettings

Constant Summary

BATT_STATUS_NEW = 1

Since:

  • 2.2.0

BATT_STATUS_GOOD = 2

Since:

  • 2.2.0

BATT_STATUS_OK = 3

Since:

  • 2.2.0

BATT_STATUS_LOW = 4

Since:

  • 2.2.0

BATT_STATUS_CRITICAL = 5

Since:

  • 2.2.0

BATT_STATUS_INVALID = 7

Since:

  • 2.2.0

BATT_STATUS_CNT = 6

Since:

  • 2.2.0

DEVICE_STATE_DEAD = 0

Device is not usable (not paired or disabled)

Since:

  • 2.2.0

DEVICE_STATE_CLOSED = 1

Device's channel is closed

Since:

  • 2.2.0

DEVICE_STATE_SEARCHING = 2

Device's channel is open and searching

Since:

  • 2.2.0

DEVICE_STATE_TRACKING = 3

Device's channel is open and tracking

Since:

  • 2.2.0

DEVICE_STATE_CNT = 4

Since:

  • 2.2.0

INVALID_CADENCE = -1

Since:

  • 3.0.0

LIGHT_NETWORK_STATE_NOT_FORMED = 0

Since:

  • 2.2.0

LIGHT_NETWORK_STATE_FORMING = 1

Since:

  • 2.2.0

LIGHT_NETWORK_STATE_FORMED = 2

Since:

  • 2.2.0

LIGHT_NETWORK_MODE_INDIVIDUAL = 0

Light modes are set by the user

Since:

  • 2.2.0

LIGHT_NETWORK_MODE_AUTO = 1

Light modes are automatically set based on ambient light (or time of day if there is no ambient light sensor available)

Since:

  • 2.2.0

LIGHT_NETWORK_MODE_HIGH_VIS = 2

Light modes are automatically placed in their highest-visibility mode

Since:

  • 2.2.0

LIGHT_MODE_OFF = 0

Since:

  • 2.2.0

LIGHT_MODE_ST_81_100 = 1

Steady beam 81-100% intensity

Since:

  • 2.2.0

LIGHT_MODE_ST_61_80 = 2

Steady beam 61-80% intensity

Since:

  • 2.2.0

LIGHT_MODE_ST_41_60 = 3

Steady beam 41-60% intensity

Since:

  • 2.2.0

LIGHT_MODE_ST_21_40 = 4

Steady beam 21-40% intensity

Since:

  • 2.2.0

LIGHT_MODE_ST_0_20 = 5

Steady beam 0-20% intensity

Since:

  • 2.2.0

LIGHT_MODE_SLOW_FLASH = 6

Since:

  • 2.2.0

LIGHT_MODE_FAST_FLASH = 7

Since:

  • 2.2.0

LIGHT_MODE_RANDOM_FLASH = 8

Since:

  • 2.2.0

LIGHT_MODE_AUTO = 9

Since:

  • 2.2.0

LIGHT_MODE_SIGNAL_LEFT_SC = 10

Turn signal left self-cancelling

Since:

  • 2.2.0

LIGHT_MODE_SIGNAL_LEFT = 11

Turn signal left

Since:

  • 2.2.0

LIGHT_MODE_SIGNAL_RIGHT_SC = 12

Turn signal right self-cancelling

Since:

  • 2.2.0

LIGHT_MODE_SIGNAL_RIGHT = 13

Turn signal right

Since:

  • 2.2.0

LIGHT_MODE_HAZARD = 14

Hazard - right and left signals flash

Since:

  • 2.2.0

LIGHT_MODE_CUSTOM_5 = 59

Custom mode (manufacturer-defined)

Since:

  • 2.2.0

LIGHT_MODE_CUSTOM_4 = 60

Since:

  • 2.2.0

LIGHT_MODE_CUSTOM_3 = 61

Since:

  • 2.2.0

LIGHT_MODE_CUSTOM_2 = 62

Since:

  • 2.2.0

LIGHT_MODE_CUSTOM_1 = 63

Since:

  • 2.2.0

LIGHT_TYPE_HEADLIGHT = 0

Since:

  • 2.2.0

LIGHT_TYPE_TAILLIGHT = 2

Since:

  • 2.2.0

LIGHT_TYPE_SIGNAL_CONFIG = 3

Configurable signal light

Since:

  • 2.2.0

LIGHT_TYPE_SIGNAL_LEFT = 4

Since:

  • 2.2.0

LIGHT_TYPE_SIGNAL_RIGHT = 5

Since:

  • 2.2.0

LIGHT_TYPE_OTHER = 7

Since:

  • 2.2.0

BIKE_POWER_SENSOR_TYPE_NONE = 0

None

Since:

  • 2.2.0

BIKE_POWER_SENSOR_TYPE_POWER_ONLY = 1

Power output directly in Watts

Since:

  • 2.2.0

BIKE_POWER_SENSOR_TYPE_WHEEL_TORQUE = 2

Power output from torque on rear wheel

Since:

  • 2.2.0

BIKE_POWER_SENSOR_TYPE_CRANK_TORQUE = 3

Power output from torque at crank

Since:

  • 2.2.0

BIKE_POWER_SENSOR_TYPE_CRANK_TORQUE_FREQUENCY = 4

Power output from torque frequency at crank

Since:

  • 2.2.0

BIKE_POWER_SENSOR_TYPE_CNT = 5

Since:

  • 2.2.0

THREAT_LEVEL_NO_THREAT = 0

Since:

  • 3.0.0

THREAT_LEVEL_VEHICLE_APPROACHING = 1

Since:

  • 3.0.0

THREAT_LEVEL_VEHICLE_FAST_APPROACHING = 2

Since:

  • 3.0.0

THREAT_SIDE_NO_SIDE = 0

Since:

  • 3.0.0

THREAT_SIDE_RIGHT = 1

Since:

  • 3.0.0

THREAT_SIDE_LEFT = 2

Since:

  • 3.0.0

INVALID_SPEED = -1

Since:

  • 3.0.0

TRAINER_MODE_BASIC_RESISTANCE = 0

Basic resistance fitness equipment training mode In this mode the user may set the percentage of maximum resistance on the equipment

Since:

  • 2.4.0

TRAINER_MODE_TARGET_POWER = 1

Target power fitness equipment training mode In this mode the user may set the target wattage output of the equipment

Since:

  • 2.4.0

TRAINER_MODE_SIMULATION = 2

Simulation fitness equipment training mode In this mode the user may set various fields to adjust resistance

Since:

  • 2.4.0

TRAINER_MODE = 7

The training mode the fitness equipment is currently in. See TRAINER_MODE_* enum for values

Since:

  • 2.4.0

TRAINER_RESISTANCE = 8

Basic resistance value of the fitness equipment. Percent of max resistance 0 - 100 input range, unit 0.5%.

Since:

  • 2.4.0

TRAINER_TARGET_POWER = 9

Target power setting of the fitness equipment. 0 - 4000W input range, unit 0.25W.

Since:

  • 2.4.0

TRAINER_SLOPE = 10

The simulated Slope/Grade setting of simulation training mode. -200% - 200% input range, unit 0.01%.

Since:

  • 2.4.0

TRAINER_SURFACE = 11

The simulated surface resistance coefficent setting of simulation training mode. 0 - 0.0127 input range, 5x10^-5 scale. Default value is set to 0xFF.

Since:

  • 2.4.0

TRAINER_WIND_COEFF = 12

The simulated wind resistance coefficent setting of simulation training mode. 0.0 - 1.86 kg/m input range, 0.01 scale. Wind Resistance Coefficient [kg/m] = Frontal Surface Area [m2] x Drag Coefficient x Air Density [kg/m3] Default value is set to 0xFF.

Since:

  • 2.4.0

TRAINER_WIND_SPEED = 13

The simulated wind speed setting of simulation training mode. -127 - +127 km/hr input range, (+)Head wind (-)Tail wind. 1 km/hr units. Simulated Wind Speed (km/h) = Raw Wind Speed Value – 127 km/h Default value is set to 0xFF.

Since:

  • 2.4.0

TRAINER_WIND_DRAFT_FACTOR = 14

The simulated wind drafting scale factor setting of simulation training mode. 0 - 1.0 input range, 0.01 scale. A draft factor of 0 removes all wind resistance, and 1.0 indicates no drafting effects.

Since:

  • 2.4.0

TRAINER_USER_WEIGHT = 15

The user weight setting of simulation training mode. 0 - 655.34 kg input range, unit 0.01kg.

Since:

  • 2.4.0

TRAINER_BIKE_WEIGHT = 16

The bike weight setting of simulation training mode. 0 - 50kg input range, unit 0.05kg

Since:

  • 2.4.0

TRAINER_WHEEL_DIAMETER = 17

The wheel diameter setting of the fitness equipment. 0 - 2.54m input range, unit 0.01m

Since:

  • 2.4.0

TRAINER_GEAR_RATIO = 18

The gear ratio setting of the fitness equipment. 0.03 - 7.65 input range, unit 0.03. gear ratio = value * 0.03

Since:

  • 2.4.0

BODY_LOCATION_LEFT_LEG = 0

Body Location ENUM (From FIT)

Since:

  • 2.4.0

BODY_LOCATION_RIGHT_LEG = 1

Since:

  • 2.4.0

BODY_LOCATION_TORSO_FRONT = 17

Since:

  • 2.4.0

BODY_LOCATION_WAIST_MID_BACK = 36

Since:

  • 2.4.0

BODY_LOCATION_WAIST_FRONT = 37

Since:

  • 2.4.0

BODY_LOCATION_WAIST_LEFT = 38

Since:

  • 2.4.0

BODY_LOCATION_WAIST_RIGHT = 39

Since:

  • 2.4.0

SENSOR_ORIENTATION_RIGHT_SIDE_UP = 0

Sensor Orientation ENUM

Since:

  • 2.4.0

SENSOR_ORIENTATION_UPSIDE_DOWN = 1

Since:

  • 2.4.0