Hi,
I have a user request to read and refer to AntPlus.TargetPowerSettings.targetPower in one of my DataField dials. I just need to know what the number is, so I don't need to be listening for changes or otherwise adding complexity. I just need to read it, once, during setup.
If I'm, correct, I can do this simply like the below:
if(AntPlus has :FitnessEquipment) { Toybox.System.println("Has FitnessEquipment"); var fe = new AntPlus.FitnessEquipment(null); var fes = fe.getTargetPowerSettings(); if(fes != null && fes.targetPowerSupported) { tPower = fes.targetPower; Toybox.System.println("FE has target power support to get "+tPower); } } else { tPower = null; }
However, as ever, I do not have either an Edge device, a power meter, or fitness equipment to test this on live.
Is there any way to simulate or otherwise verify this?
Thanks,
G
ETA: I also need to verify whether or not I need to manage "setTrainerMode()" or if I can just read "getTrainerMode()" as the docs say that there will be no TargetPowerSettings unless the trainer mode is in "target power" mode.