I'm just starting with Connect IQ development and have already bumped into an issue I don't understand.
I'm trying to get the battery status of a sensor (at this moment, any sensor). The Garmin docs says:
var batteryStatus = AntPlus.getBatteryStatus(null); // Get the batteryStatus Enum value
// for a single component system.
In my code i have:
import Toybox.AntPlus;
...
var myDevice = new AntPlus.BikeSpeed(null);
var batteryStatus = myDevice.getBatteryStatus(null);
However, the second line gives an error:
Invalid 'Null' passed as parameter 1 of type '$.Toybox.Lang.Number'.
I realise that this is definitely a newbie question but I'm finding the whole entry into the SDK a bit baffling (and I have 40+ years of software engineering behind me)