Class: Toybox.AntPlus.FitnessEquipment
- Inherits:
-
Toybox.AntPlus.Device
Overview
Represents a Fitness Equipment Device instance.
Instance Method Summary collapse
-
controlEquipment(setting as AntPlus.TrainerValue, data as Lang.Float or AntPlus.TrainerMode) as Void
Control the fitness Equipment Note: Setting a value related to a specific training mode will cause the fitness equipment to change to that mode.
-
getEquipmentData() as AntPlus.FitnessEquipmentData
Get the current training data from the FE.
-
getResistanceSettings() as AntPlus.ResistanceSettings
Get the resistance percentage setting of the fitness equipment for basic resistance training mode.
-
getSimulationSettings() as AntPlus.SimulationSettings
Get the wind and track resistance simulation settings.
-
getTargetPowerSettings() as AntPlus.TargetPowerSettings
Get the target power setting of the fitness equipment for target power training mode.
-
getTrainerMode() as AntPlus.FitnessEquipmentMode
Get the current training mode and supported modes of the fitness equipment.
-
getUserSettings() as AntPlus.UserSettings
Get the user configuration settings of the fitness equipment for simulation training mode.
-
initialize(listener as AntPlus.FitnessEquipmentListener or Null)
Constructor.
-
setTrainerMode(mode as AntPlus.TrainerMode) as Void
Set the trainer mode.
Instance Method Details
controlEquipment(setting as AntPlus.TrainerValue, data as Lang.Float or AntPlus.TrainerMode) as Void
Control the fitness Equipment Note: Setting a value related to a specific training mode will cause the fitness equipment to change to that mode. For example, controlEquipment(TRAINER_TARGET_POWER, 100) will set the fitness equipment to target power mode with target power set to 100W if such mode is supported. Values out of range will be set to within the nearest range boundary value.
getEquipmentData() as AntPlus.FitnessEquipmentData
Get the current training data from the FE
getResistanceSettings() as AntPlus.ResistanceSettings
Get the resistance percentage setting of the fitness equipment
for basic resistance training mode.
You should set resistance values and be in basic resistance training mode before
calling this method, otherwise null
or default values may be returned.
getSimulationSettings() as AntPlus.SimulationSettings
Get the wind and track resistance simulation settings.
You should set wind and track settings, as well as be in simulation training mode
before calling this method or null
or default values may be returned.
getTargetPowerSettings() as AntPlus.TargetPowerSettings
Get the target power setting of the fitness equipment for
target power training mode.
You should set the target power and be in target power training mode before calling
this method, otherwise null
or default values may be returned.
getTrainerMode() as AntPlus.FitnessEquipmentMode
Get the current training mode and supported modes of the fitness equipment
getUserSettings() as AntPlus.UserSettings
Get the user configuration settings of the fitness equipment for simulation
training mode.
You should set user settings values and be in simulation mode before
calling this method, otherwise null
or default values may be returned.
initialize(listener as AntPlus.FitnessEquipmentListener or Null)
Constructor
setTrainerMode(mode as AntPlus.TrainerMode) as Void
Set the trainer mode. You should check the capable modes of the fitness equipment, as the command will be ignored by the fitness equipment if the mode is not supported.