Acknowledged
CIQQA-3115

bug: System.getSystemStats().battery is Number instead of Float

According to the docs: Toybox.System.Stats.battery as Float, but on real fr965 it is a Number or at least it's value is always a Number (without decimal).

function initialize() {
    session = ActivityRecording.createSession({
	 	:name => "test",
	 	:sport => Activity.Sport.SPORT_RUNNING,
	 	:subSport => Activity.SubSport.SUB_SPORT_TREADMILL
	});
    batteryPercentageField = session.createField("battery", 11, FitContributor.DATA_TYPE_FLOAT, { :mesgType => FitContributor.MESG_TYPE_RECORD, :units => "%" });
}

function compute() as Void {
    batteryPercentageField.setData(System.getSystemStats().battery);
}

Parents
  • Yes, I messed up with this sentence. What I actually meant was that the value I see is always a whole number. I haven't checked the type. Fortunately my code already is written in a way that it doesn't care if it's type is Number or Float.

Comment
  • Yes, I messed up with this sentence. What I actually meant was that the value I see is always a whole number. I haven't checked the type. Fortunately my code already is written in a way that it doesn't care if it's type is Number or Float.

Children
No Data