Skip to content

Commit

Permalink
Updating documentation and fix some spelling errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenHidem committed Jul 29, 2023
1 parent 9f42a3d commit b4fc03a
Show file tree
Hide file tree
Showing 64 changed files with 159 additions and 94 deletions.
2 changes: 1 addition & 1 deletion AntPlus/DeviceProfiles/AssetTracker/Asset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public enum AssetStatus
/// Gets the color of the asset. This is an 8 bit RGB value.
/// </summary>
/// <value>
/// The color. Uses the 3-3-2 bit RGB colour palette.
/// The color. Uses the 3-3-2 bit RGB color palette.
/// </value>
public byte Color { get; private set; }
/// <summary>Gets the distance.</summary>
Expand Down
5 changes: 4 additions & 1 deletion AntPlus/DeviceProfiles/AssetTracker/Tracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ public override void Parse(byte[] dataPage)
asset.ParseLocation1(dataPage);
if (asset.Status.HasFlag(Asset.AssetStatus.RemoveAsset))
{
Assets.Remove(asset);
lock (Assets.CollectionLock)
{
Assets.Remove(asset);
}
}
break;
case DataPage.AssetLocation2:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace SmallEarthTech.AntPlus.DeviceProfiles.BicyclePower
{
/// <summary>
/// A thread safe collection of measurments reported during calibration.
/// A thread safe collection of measurements reported during calibration.
/// </summary>
public class MeasurementCollection : ObservableCollection<MeasurementOutputData>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class TorqueEffectivenessAndPedalSmoothness : INotifyPropertyChanged

/// <summary>
/// Parses the torque effectiveness and pedal smoothness data page.
/// Note that if the right and left pedal smootness is combined, the right and left values will be the same.
/// Note that if the right and left pedal smoothness is combined, the right and left values will be the same.
/// </summary>
/// <param name="dataPage">The data page.</param>
public void Parse(byte[] dataPage)
Expand Down
2 changes: 1 addition & 1 deletion AntPlus/DeviceProfiles/FitnessEquipment/Climber.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public enum CapabilityFlags

/// <summary>Gets the stride cycles. Accumulated value of the complete number of stride cycles (i.e. number of steps climbed/2)</summary>
public int StrideCycles { get; private set; }
/// <summary>Gets the cadence in stride cycles per minuter.</summary>
/// <summary>Gets the cadence in stride cycles per minute.</summary>
public byte Cadence { get; private set; }
/// <summary>Gets the instantaneous power in watts.</summary>
public int InstantaneousPower { get; private set; }
Expand Down
4 changes: 2 additions & 2 deletions AntPlus/DeviceProfiles/Geocache.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public async Task<MessagingReturnCode> UpdateLoggedVisits()
/// <param name="longitude">The longitude in decimal degrees.</param>
/// <param name="hint">The next stage hint or message.</param>
/// <returns>Status of the request. See <see cref="MessagingReturnCode"/>.</returns>
public MessagingReturnCode ProgramGeocache(string id, uint? pin, double? latitude, double? longitude, string hint)
public async Task<MessagingReturnCode> ProgramGeocache(string id, uint? pin, double? latitude, double? longitude, string hint)
{
programmingGeocache = true;
byte page = 1; // initial page number for optional pages
Expand Down Expand Up @@ -352,7 +352,7 @@ public MessagingReturnCode ProgramGeocache(string id, uint? pin, double? latitud
MessagingReturnCode returnCode = MessagingReturnCode.Pass;
foreach (byte[] msg in messages)
{
returnCode = SendExtAcknowledgedMessage(msg, 16000).Result;
returnCode = await SendExtAcknowledgedMessage(msg, 16000);
if (returnCode != MessagingReturnCode.Pass)
{
break;
Expand Down
4 changes: 2 additions & 2 deletions AntRadioInterface/IAntRadio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ public enum ResponseMsgId : byte
InvalidScanTxChannels = 0x31,
/// <summary>The invalid parameter</summary>
InvalidParameter = 0x33,
/// <summary>The encrypt negotiation succes</summary>
EncryptNegotiationSucces = 0x38,
/// <summary>The encrypt negotiation success</summary>
EncryptNegotiationSuccess = 0x38,
/// <summary>The encrypt negotiation failed</summary>
EncryptNegotiationFail = 0x39,
/// <summary>The NVM full error</summary>
Expand Down
2 changes: 1 addition & 1 deletion AntRadioInterface/IAntUsbRadio.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface IAntUsbRadio
/// <returns>The vendor ID of this device.</returns>
ushort GetVID();

/// <summary>Gets the USB device droduct description.</summary>
/// <summary>Gets the USB device product description.</summary>
/// <returns>The USB product string of this device.</returns>
string GetProductDescription();

Expand Down
5 changes: 5 additions & 0 deletions Documentation/Content/VersionHistory/VersionHistory.aml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ life of the project.</para>
<link xlink:href="47871b73-83b7-4cf4-8842-44d7520804aa" />
</para>
</listItem>
<listItem>
<para>
<link xlink:href="07393f6f-e5a8-47d3-bbcc-6c6dd391afb9" />
</para>
</listItem>

<!--<listItem>
<para>[TODO: Add links to each specific version page]</para>
Expand Down
30 changes: 30 additions & 0 deletions Documentation/Content/VersionHistory/v2.1.0.0.aml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<topic id="07393f6f-e5a8-47d3-bbcc-6c6dd391afb9" revisionNumber="1">
<developerConceptualDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
<introduction>
<para>Version 2.1.0.0 was released on July 29, 2023.</para>
</introduction>
<section>
<title>Breaking Changes in This Release</title>
<content>
<list class="bullet">
<listItem>
<para>Refactored class library and examples to use async/await.</para>
</listItem>
<listItem>
<para>Removed MessageRate property from geocache.</para>
</listItem>
<listItem>
<para>Changed AntUsbStick target platform to x86.</para>
</listItem>
<listItem>
<para>Code clean up, tweaks, and logging updates.</para>
</listItem>
</list>
</content>
</section>
<relatedTopics>
<link xlink:href="4a8ae1c2-5d9b-4e27-bd18-34b479401b65" />
</relatedTopics>
</developerConceptualDocument>
</topic>
38 changes: 26 additions & 12 deletions Documentation/Content/Welcome.aml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@
derived from the AntDevice class. The AntRadioInterface defines an interface to interact
with an ANT radio to send and receive from an ANT device.
</para>
<para>
The AntUsbStick project is derived from AntRadioInterface and implements a concrete
implementation that supports commercially available ANT USB sticks from Dynastream/Garmin.
</para>
<para>
The AntPlusUsbClient WPF application pulls these pieces together to demonstrate a simple
usage of the ANT class library.
</para>
</content>
</section>

Expand Down Expand Up @@ -72,6 +64,32 @@
</para>
</content>
</section>

<section>
<title>Examples</title>
<content>
<list class="bullet">
<listItem>
<para>
The AntUsbStick class library is derived from AntRadioInterface and implements a concrete
implementation that supports commercially available ANT USB sticks from Dynastream/Garmin.
</para>
</listItem>
<listItem>
<para>
The AntPlusUsbClient WPF application demonstrates usage of the ANT class library. It depends on the AntUsbStick project.
</para>
</listItem>
<listItem>
<para>
The AntMulticastServer console application uses the AntUsbStick class library to send/receive ANT messages over the UDP network protocol.
A seperate Xamarin Forms solution with an Android app uses this UDP socket. The Xamarin solution is
located at <a href="https://github.com/StephenHidem/XamAntClientApp/">XamAntClientApp</a>.
</para>
</listItem>
</list>
</content>
</section>

<section>
<title>Work in Progress</title>
Expand All @@ -80,10 +98,6 @@
ANT-FS is not currently supported. Some device profiles are not supported - please
create an issue if there is an ANT device profile you would like to see supported.
</para>
<para>
My next step is create a network AntRadioInterface implementation for use with Xamarin and MAUI
applications to extend the reach to mobile devices.
</para>
</content>
</section>

Expand Down
3 changes: 2 additions & 1 deletion Documentation/ContentLayout.content
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
<HelpKeyword index="K" term="version, 1.0.0.0" />
</HelpKeywords>
</Topic>
<Topic id="47871b73-83b7-4cf4-8842-44d7520804aa" visible="True" isSelected="true" title="Version 2.0.0.0">
<Topic id="47871b73-83b7-4cf4-8842-44d7520804aa" visible="True" title="Version 2.0.0.0">
<HelpKeywords>
<HelpKeyword index="K" term="version, 2.0.0.0" />
</HelpKeywords>
</Topic>
<Topic id="07393f6f-e5a8-47d3-bbcc-6c6dd391afb9" visible="True" isSelected="true" title="Version 2.1.0.0" />
</Topic>
</Topics>
1 change: 1 addition & 0 deletions Documentation/Documentation.shfbproj
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
<Folder Include="media" />
</ItemGroup>
<ItemGroup>
<None Include="Content\VersionHistory\v2.1.0.0.aml" />
<None Include="Content\VersionHistory\v1.0.0.0.aml" />
<None Include="Content\VersionHistory\v2.0.0.0.aml" />
<None Include="Content\VersionHistory\VersionHistory.aml" />
Expand Down
11 changes: 4 additions & 7 deletions Examples/WpfUsbStickApp/ViewModels/GeocacheViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private async Task RequestAuthentication()
authReq = true;
CheckCanExecutes();
Random rnd = new();
_ = await Task.Run(() => geocache.RequestAuthentication((uint)rnd.Next()));
_ = await geocache.RequestAuthentication((uint)rnd.Next());
}
private bool CanRequestAuthentication()
{
Expand All @@ -105,12 +105,9 @@ private async Task ProgramGeocache()
{
programming = true;
CheckCanExecutes();
await Task.Run(() =>
{
geocache.ProgramGeocache(TrackableId, Pin, Latitude, Longitude, Hint);
programming = false;
CheckCanExecutes();
});
_ = await geocache.ProgramGeocache(TrackableId, Pin, Latitude, Longitude, Hint);
programming = false;
CheckCanExecutes();
}
private bool CanProgramGeocache()
{
Expand Down
1 change: 0 additions & 1 deletion Examples/WpfUsbStickApp/Views/GeocacheWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<StackPanel>
<GroupBox Header="Data Pages">
<StackPanel>
<TextBlock Text="{Binding Geocache.MessageRate, StringFormat='Message Rate: {0:F2}Hz'}"/>
<TextBlock Text="{Binding Geocache.TrackableId, StringFormat='Trackable ID: {0}'}"/>
<TextBlock Text="{Binding Geocache.ProgrammingPIN, StringFormat='Programming PIN: {0}'}"/>
<TextBlock Text="{Binding Geocache.TotalPagesProgrammed, StringFormat='Total Pages Programmed: {0}'}"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/fti/FTI_100.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/fti/FTI_101.json

Large diffs are not rendered by default.

Loading

0 comments on commit b4fc03a

Please sign in to comment.