Skip to content

Commit 9f42a3d

Browse files
committed
Updating method return documentation.
1 parent 2f86c31 commit 9f42a3d

File tree

70 files changed

+178
-187
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+178
-187
lines changed

AntPlus/DeviceProfiles/BicyclePower/Calibration.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ internal void ParseMeasurementOutputData(byte[] dataPage)
140140
}
141141

142142
/// <summary>Requests manual calibration.</summary>
143+
/// <returns><see cref="MessagingReturnCode"/></returns>
143144
public async Task<MessagingReturnCode> RequestManualCalibration()
144145
{
145146
CalibrationStatus = CalibrationResponse.InProgress;
@@ -149,6 +150,7 @@ public async Task<MessagingReturnCode> RequestManualCalibration()
149150

150151
/// <summary>Sets the sensor automatic zero configuration.</summary>
151152
/// <param name="autoZero">The automatic zero.</param>
153+
/// <returns><see cref="MessagingReturnCode"/></returns>
152154
public async Task<MessagingReturnCode> SetAutoZeroConfiguration(AutoZero autoZero)
153155
{
154156
CalibrationStatus = CalibrationResponse.Unknown;
@@ -157,6 +159,7 @@ public async Task<MessagingReturnCode> SetAutoZeroConfiguration(AutoZero autoZer
157159
}
158160

159161
/// <summary>Requests the manufacturer specific custom calibration parameters.</summary>
162+
/// <returns><see cref="MessagingReturnCode"/></returns>
160163
public async Task<MessagingReturnCode> RequestCustomParameters()
161164
{
162165
CalibrationStatus = CalibrationResponse.InProgress;
@@ -167,6 +170,7 @@ public async Task<MessagingReturnCode> RequestCustomParameters()
167170
/// <summary>Sets the custom calibration parameters. This is manufacturer specified limited to a
168171
/// maximum of 6 bytes.</summary>
169172
/// <param name="customParameters">The custom parameters. Defined by the manufacturer.</param>
173+
/// <returns><see cref="MessagingReturnCode"/></returns>
170174
/// <exception cref="System.ArgumentException">Custom parameters must be 6 bytes in length.</exception>
171175
public async Task<MessagingReturnCode> SetCustomParameters(byte[] customParameters)
172176
{

AntPlus/DeviceProfiles/BicyclePower/CrankTorqueFrequencySensor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ internal void ParseCalibrationMessage(byte[] message)
131131

132132
/// <summary>Saves the slope to flash.</summary>
133133
/// <param name="slope">The slope. Valid range is 10.0 to 50.0 Nm/Hz. Resolution is 0.1 Nm/Hz.</param>
134+
/// <returns><see cref="MessagingReturnCode"/></returns>
134135
/// <exception cref="ArgumentOutOfRangeException">Invalid slope value.</exception>
135136
public async Task<MessagingReturnCode> SaveSlopeToFlash(double slope)
136137
{
@@ -149,6 +150,7 @@ public async Task<MessagingReturnCode> SaveSlopeToFlash(double slope)
149150

150151
/// <summary>Saves the serial number to flash.</summary>
151152
/// <param name="serialNumber">The serial number.</param>
153+
/// <returns><see cref="MessagingReturnCode"/></returns>
152154
public async Task<MessagingReturnCode> SaveSerialNumberToFlash(ushort serialNumber)
153155
{
154156
byte[] msg = new byte[] { (byte)DataPage.Calibration, 0x10, (byte)CTFDefinedId.SerialNumber, 0xFF, 0xFF, 0xFF };

AntPlus/DeviceProfiles/FitnessEquipment/Equipment.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ private void HandleFEState(byte state)
371371

372372
/// <summary>Sets the percentage of maximum resistance resistance.</summary>
373373
/// <param name="resistance">The resistance.</param>
374+
/// <returns><see cref="MessagingReturnCode"/></returns>
374375
public async Task<MessagingReturnCode> SetBasicResistance(double resistance)
375376
{
376377
byte[] res = new byte[] { (byte)(resistance / 0.5) };
@@ -381,6 +382,7 @@ public async Task<MessagingReturnCode> SetBasicResistance(double resistance)
381382

382383
/// <summary>Sets the target power in wats.</summary>
383384
/// <param name="power">The power in watts. Resolution is 0.25 watt.</param>
385+
/// <returns><see cref="MessagingReturnCode"/></returns>
384386
public async Task<MessagingReturnCode> SetTargetPower(double power)
385387
{
386388
byte[] pow = BitConverter.GetBytes((ushort)(power / 0.25));
@@ -393,6 +395,7 @@ public async Task<MessagingReturnCode> SetTargetPower(double power)
393395
/// <param name="windResistanceCoefficient">The wind resistance coefficient. Resolution is 0.01 kg/m.</param>
394396
/// <param name="windSpeed">The wind speed in km/h.</param>
395397
/// <param name="draftingFactor">The drafting scale factor. Range is 0 to 1.00.</param>
398+
/// <returns><see cref="MessagingReturnCode"/></returns>
396399
public async Task<MessagingReturnCode> SetWindResistance(double windResistanceCoefficient, sbyte windSpeed, double draftingFactor)
397400
{
398401
byte[] wrc = new byte[] { (byte)(windResistanceCoefficient / 0.01) };
@@ -407,6 +410,7 @@ public async Task<MessagingReturnCode> SetWindResistance(double windResistanceCo
407410
/// <summary>Sets the track resistance.</summary>
408411
/// <param name="grade">The grade. Set as a percentage of vertical displacement to horizontal displacement.</param>
409412
/// <param name="rollingResistanceCoefficient">The rolling resistance coefficient.</param>
413+
/// <returns><see cref="MessagingReturnCode"/></returns>
410414
public async Task<MessagingReturnCode> SetTrackResistance(double grade, double rollingResistanceCoefficient = 0.004)
411415
{
412416
byte[] grd = BitConverter.GetBytes((ushort)((grade + 200) / 0.01));
@@ -423,6 +427,7 @@ public async Task<MessagingReturnCode> SetTrackResistance(double grade, double r
423427
/// <param name="bikeWeight">The bike weight in kg.</param>
424428
/// <param name="wheelDiameter">The wheel diameter in meters.</param>
425429
/// <param name="gearRatio">The gear ratio.</param>
430+
/// <returns><see cref="MessagingReturnCode"/></returns>
426431
public async Task<MessagingReturnCode> SetUserConfiguration(double userWeight, byte wheelDiameterOffset, double bikeWeight, double wheelDiameter, double gearRatio)
427432
{
428433
byte[] uw = BitConverter.GetBytes((ushort)(userWeight / 0.01));
@@ -439,6 +444,7 @@ public async Task<MessagingReturnCode> SetUserConfiguration(double userWeight, b
439444
}
440445

441446
/// <summary>Requests the fitness equipment capabilities.</summary>
447+
/// <returns><see cref="MessagingReturnCode"/></returns>
442448
public async Task<MessagingReturnCode> RequestFECapabilities()
443449
{
444450
return await RequestDataPage(DataPage.FECapabilities);

AntPlus/DeviceProfiles/HeartRate.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public enum HeartbeatEventType
9797
private bool isFirstDataMessage = true; // used for accumulated values
9898
private byte prevBeatCount;
9999
private ushort prevBeatEventTime;
100-
private int accumHeartBeatEventTime;
100+
private int accumulatedHeartBeatEventTime;
101101
private bool pageToggle = false;
102102
private int observedToggle;
103103
private int rrInterval;
@@ -114,9 +114,9 @@ public readonly struct CommonHeartRateData
114114
/// <summary>RR interval in milliseconds.</summary>
115115
public int RRInterval { get; }
116116

117-
internal CommonHeartRateData(int accumEventTime, byte heartRate, int rrInterval)
117+
internal CommonHeartRateData(int accumulatedEventTime, byte heartRate, int rrInterval)
118118
{
119-
AccumulatedHeartBeatEventTime = accumEventTime * 1000 / 1024;
119+
AccumulatedHeartBeatEventTime = accumulatedEventTime * 1000 / 1024;
120120
ComputedHeartRate = heartRate;
121121
RRInterval = rrInterval;
122122
}
@@ -293,7 +293,7 @@ public override void Parse(byte[] dataPage)
293293
prevBeatEventTime = BitConverter.ToUInt16(dataPage, 4);
294294
prevBeatCount = dataPage[6];
295295
lastDataPage = dataPage;
296-
HeartRateData = new CommonHeartRateData(accumHeartBeatEventTime, dataPage[7], rrInterval);
296+
HeartRateData = new CommonHeartRateData(accumulatedHeartBeatEventTime, dataPage[7], rrInterval);
297297
RaisePropertyChange(nameof(HeartRateData));
298298
return;
299299
}
@@ -316,8 +316,8 @@ public override void Parse(byte[] dataPage)
316316
rrInterval = CalculateRRInterval(prevBeatEventTime, BitConverter.ToUInt16(dataPage, 4));
317317
}
318318

319-
accumHeartBeatEventTime += Utils.CalculateDelta(BitConverter.ToUInt16(dataPage, 4), ref prevBeatEventTime);
320-
HeartRateData = new CommonHeartRateData(accumHeartBeatEventTime, dataPage[7], rrInterval);
319+
accumulatedHeartBeatEventTime += Utils.CalculateDelta(BitConverter.ToUInt16(dataPage, 4), ref prevBeatEventTime);
320+
HeartRateData = new CommonHeartRateData(accumulatedHeartBeatEventTime, dataPage[7], rrInterval);
321321
RaisePropertyChange(nameof(HeartRateData));
322322
}
323323

@@ -386,7 +386,8 @@ public override void Parse(byte[] dataPage)
386386
/// Sets the sport mode.
387387
/// </summary>
388388
/// <param name="sportMode">The sport mode.</param>
389-
/// <param name="subSportMode">Subsport mode.</param>
389+
/// <param name="subSportMode">The sub sport mode.</param>
390+
/// <returns><see cref="MessagingReturnCode"/></returns>
390391
public async Task<MessagingReturnCode> SetSportMode(SportMode sportMode, SubSportMode subSportMode = SubSportMode.None)
391392
{
392393
return await SendExtAcknowledgedMessage(CommonDataPages.FormatModeSettingsPage(sportMode, subSportMode));
@@ -403,6 +404,7 @@ public async Task<MessagingReturnCode> SetSportMode(SportMode sportMode, SubSpor
403404
/// </remarks>
404405
/// <param name="applyGymMode">if set to <c>true</c> apply gym mode. Displays cannot rely on this field as older sensors do not decode it. The Gym Mode bit shall be set to the last received value from the capabilities page if Apply Gym Mode is set to false.</param>
405406
/// <param name="gymMode">if set to <c>true</c> gym mode is enabled.</param>
407+
/// <returns><see cref="MessagingReturnCode"/></returns>
406408
public async Task<MessagingReturnCode> SetHRFeature(bool applyGymMode, bool gymMode)
407409
{
408410
byte[] msg = new byte[] { (byte)DataPage.HRFeature, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, (byte)(applyGymMode ? 0xFF : 0x7F), (byte)(gymMode ? 0x80 : 0x00) };

docs/fti/FTI_100.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/fti/FTI_101.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)