Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion AntPlus.Extensions.Hosting/AntCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private void MessageHandler(object? sender, AntResponse e)
// re-open the channel in scan mode
if (_antRadio is IAntControl antControl)
{
_logger.LogError("Re-opening channel 0 in scan mode.");
_logger.LogWarning("Re-opening channel 0 in scan mode.");
_ = antControl.OpenRxScanMode();
}
else
Expand Down
14 changes: 11 additions & 3 deletions AntPlus.Extensions.Hosting/Hosting.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,29 @@
<PackageIcon>PackageLogo.png</PackageIcon>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageReleaseNotes>
Verify the AntRadio implementation supports IAntControl when channel 0 is unexpectedly closed in continuous scan mode.
Added OSMF software license.
</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<VersionPrefix>1.2.1</VersionPrefix>
<VersionPrefix>2.0.0</VersionPrefix>
<PackageProjectUrl>https://stephenhidem.github.io/AntPlus</PackageProjectUrl>
<RepositoryUrl>https://github.com/StephenHidem/AntPlus</RepositoryUrl>
<Configurations>Debug;Release</Configurations>
<PackageLicenseFile>OSMFEULA.txt</PackageLicenseFile>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

<ItemGroup>
<None Include="..\OSMFEULA.txt">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.4" />
<PackageReference Include="Microsoft.Maui.Core" Version="9.0.60" />
Expand Down
18 changes: 16 additions & 2 deletions AntPlus.Extensions.Hosting/readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Small Earth Technology ANT+ Hosting Extensions
# Small Earth Technology ANT+ Hosting Extensions
If you use dependency injection to compose your apps, check this extension out! With a few lines added to the DI container/host builder, the
complete library is ready to be used by the app. Here's a snippet from the WPF sample -
```csharp
Expand All @@ -24,10 +24,24 @@ An ==important== benefit of using dependency injection is that you can now add A
ANT+ Class Library. A detailed guide on how to do this is available in the [documentation](https://stephenhidem.github.io/AntPlus/html/0e424769-d4c6-4a98-9384-a810421ad5e1.htm). You can also set the global
ANT device timeout from a variety of sources such as the command line, appsettings.json, etc. and let the DI container
inject them into the ANT+ Class Library.
## Open Source Maintenance Fee
This project requires an [Open Source Maintenance
Fee][osmf]. While the source code is
freely available under the terms of the [LICENSE][license], all other aspects of
the project--including participating in
discussions and downloading releases--require [adherence to the
Maintenance Fee][eula].

### Addtional Links
In short, if you use this project to generate revenue, the [Maintenance
Fee is required][eula]. Note that a portion of the fee sponsors other open source projects that this project uses.

To pay the Maintenance Fee, [become a Sponsor](https://github.com/sponsors/StephenHidem).
## Addtional Links
* [Documentation](https://stephenhidem.github.io/AntPlus/html/5e5a5e1c-a0e6-4ef0-a8f5-12f9394450c4.htm)
* [Examples Overview](https://stephenhidem.github.io/AntPlus/html/27d74052-f564-4aaa-97a0-5f166ffd5ce3.htm)
* [Issues](https://github.com/StephenHidem/AntPlus/issues) - Mention hosting extensions in the issue title.
* [Discussions](https://github.com/StephenHidem/AntPlus/discussions) - Post questions and join discussions.

[osmf]: https://opensourcemaintenancefee.org/
[license]: https://github.com/StephenHidem/AntPlus/blob/master/LICENSE.txt
[eula]: https://github.com/StephenHidem/AntPlus/blob/master/OSMFEULA.txt
14 changes: 11 additions & 3 deletions AntPlus/AntPlus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<RootNamespace>SmallEarthTech.$(MSBuildProjectName.Replace(" ", "_"))</RootNamespace>
<PackageId>SmallEarthTech.$(AssemblyName)</PackageId>
<VersionPrefix>5.1.2</VersionPrefix>
<VersionPrefix>6.0.0</VersionPrefix>
<Title>ANT+ Class Library</Title>
<PackageProjectUrl>https://stephenhidem.github.io/AntPlus</PackageProjectUrl>
<Authors>Stephen Hidem</Authors>
<Copyright>© $(Authors) 2023. All rights reserved.</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageTags>ant; ant+; antplus; smallearthtech</PackageTags>
Expand All @@ -24,14 +23,16 @@
<PackageIcon>PackageLogo.png</PackageIcon>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageReleaseNotes>
Fixed issue #64 - FE specific data pages are incorrectly logged as unknown data pages.
Added OSMF software license.
</PackageReleaseNotes>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

<PropertyGroup>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
<PackageLicenseFile>OSMFEULA.txt</PackageLicenseFile>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
Expand Down Expand Up @@ -84,6 +85,13 @@
<EmbeddedResource Include="Images\Unknown.png" />
</ItemGroup>

<ItemGroup>
<None Include="..\OSMFEULA.txt">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.4" />
Expand Down
21 changes: 18 additions & 3 deletions AntPlus/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Small Earth Technology ANT+ Class Library
# Small Earth Technology ANT+ Class Library
Add a reference to this class in your application to interact with ANT+ devices and display sensor data.
### Supported ANT+ profiles:
## Supported ANT+ profiles:
- Asset tracker
- Bicycle power
- Bike speed and cadence
Expand All @@ -11,9 +11,24 @@ Add a reference to this class in your application to interact with ANT+ devices
- Stride based speed and distance

Unknown devices are supported by the UnknownDevice class.
### Additional Links
## Open Source Maintenance Fee
This project requires an [Open Source Maintenance
Fee][osmf]. While the source code is
freely available under the terms of the [LICENSE][license], all other aspects of
the project--including participating in
discussions and downloading releases--require [adherence to the
Maintenance Fee][eula].

In short, if you use this project to generate revenue, the [Maintenance
Fee is required][eula]. Note that a portion of the fee sponsors other open source projects that this project uses.

To pay the Maintenance Fee, [become a Sponsor](https://github.com/sponsors/StephenHidem).
## Additional Links
* [Documentation](https://stephenhidem.github.io/AntPlus/html/5e5a5e1c-a0e6-4ef0-a8f5-12f9394450c4.htm)
* [Examples Overview](https://stephenhidem.github.io/AntPlus/html/27d74052-f564-4aaa-97a0-5f166ffd5ce3.htm)
* [Issues](https://github.com/StephenHidem/AntPlus/issues) - Mention AntPlus class library in the issue title.
* [Discussions](https://github.com/StephenHidem/AntPlus/discussions) - Post questions and join discussions.

[osmf]: https://opensourcemaintenancefee.org/
[license]: https://github.com/StephenHidem/AntPlus/blob/master/LICENSE.txt
[eula]: https://github.com/StephenHidem/AntPlus/blob/master/OSMFEULA.txt
18 changes: 15 additions & 3 deletions AntRadioInterface/AntRadioInterface.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@
<PackageId>SmallEarthTech.$(AssemblyName)</PackageId>
<Authors>Stephen Hidem</Authors>
<Title>ANT+ Radio Interface Class Library</Title>
<VersionPrefix>4.1.0</VersionPrefix>
<VersionPrefix>5.0.0</VersionPrefix>
<Copyright>© $(Authors) 2023. All rights reserved.</Copyright>
<PackageProjectUrl>https://stephenhidem.github.io/AntPlus</PackageProjectUrl>
<PackageTags>ant; ant+; antplus; dynastream; smallearthtech</PackageTags>
<RepositoryUrl>https://github.com/StephenHidem/AntPlus</RepositoryUrl>
<Description>The AntRadioInterface defines an interface to interact with an ANT radio to send and receive from an ANT device. Use this package to create a concrete implementation of an ANT radio.</Description>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
Expand All @@ -22,13 +21,19 @@
<GeneratePackageOnBuild Condition="'$(Configuration)' == 'Release'">True</GeneratePackageOnBuild>
<PackageIcon>PackageLogo.png</PackageIcon>
<PackageReadmeFile>readme.md</PackageReadmeFile>
<PackageReleaseNotes>Removed Flags attribute from EventBufferConfig. Fixed LibConfigFlags definition.</PackageReleaseNotes>
<PackageReleaseNotes>
1. Added OSMF sofware license.
2. Added`RadioCapabilities` (0x54),`StartupMessage` (0x6F) and `SerialErrorMessage` (0xAE).
to MessageId enum.
</PackageReleaseNotes>
<Configurations>Debug;Release</Configurations>
</PropertyGroup>

<PropertyGroup>
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseFile>OSMFEULA.txt</PackageLicenseFile>
</PropertyGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
Expand All @@ -43,6 +48,13 @@
<Compile Remove="IAntResponse.cs" />
</ItemGroup>

<ItemGroup>
<None Include="..\OSMFEULA.txt">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
Expand Down
8 changes: 7 additions & 1 deletion AntRadioInterface/AntResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,18 @@ public enum MessageId
AcknowledgedData = 0x4F,
/// <summary>The burst data</summary>
BurstData = 0x50,
/// <summary>ANT radio capabilities</summary>
RadioCapabilities = 0x54,
/// <summary>The extended broadcast data</summary>
ExtBroadcastData = 0x5D,
/// <summary>The extended acknowledged data</summary>
ExtAcknowledgedData = 0x5E,
/// <summary>The extended burst data</summary>
ExtBurstData = 0x5F
ExtBurstData = 0x5F,
/// <summary>The startup message</summary>
StartupMessage = 0x6F,
/// <summary>The serial error message</summary>
SerialErrorMessage = 0xAE
}

/// <summary>
Expand Down
20 changes: 18 additions & 2 deletions AntRadioInterface/readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
## Small Earth Technology ANT+ Radio Interface Library
# Small Earth Technology ANT+ Radio Interface Library
Derive concrete class implementations from the AntRadioInterface class to support the hardware being used. This largely
follows Dynastream's .NET and native implementations of their ANT USB stick. Multiple interfaces are defined along with
classes to derive from (AntResponse and DeviceCapabilities). These classes and interfaces are used by the ANT+ class library.

See AntUsbStick in the [repository](https://github.com/StephenHidem/AntPlus/tree/master/Examples/AntUsbStick) for an example
that supports the Dynastream/Garmin ANT USB stick.
One important thing to note is this example uses the .NET and native DLLs provided in Dynastream's PC SDK.
### Additional Links
## Open Source Maintenance Fee
This project requires an [Open Source Maintenance
Fee][osmf]. While the source code is
freely available under the terms of the [LICENSE][license], all other aspects of
the project--including participating in
discussions and downloading releases--require [adherence to the
Maintenance Fee][eula].

In short, if you use this project to generate revenue, the [Maintenance
Fee is required][eula]. Note that a portion of the fee sponsors other open source projects that this project uses.

To pay the Maintenance Fee, [become a Sponsor](https://github.com/sponsors/StephenHidem).
## Additional Links
* [Documentation](https://stephenhidem.github.io/AntPlus/html/5e5a5e1c-a0e6-4ef0-a8f5-12f9394450c4.htm)
* [Examples Overview](https://stephenhidem.github.io/AntPlus/html/27d74052-f564-4aaa-97a0-5f166ffd5ce3.htm)
* [Issues](https://github.com/StephenHidem/AntPlus/issues) - Mention AntRadioInterface in the issue title.
* [Discussions](https://github.com/StephenHidem/AntPlus/discussions) - Post questions and join discussions.

[osmf]: https://opensourcemaintenancefee.org/
[license]: https://github.com/StephenHidem/AntPlus/blob/master/LICENSE.txt
[eula]: https://github.com/StephenHidem/AntPlus/blob/master/OSMFEULA.txt
13 changes: 12 additions & 1 deletion Documentation/Content/AntUsbStickOverview.aml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,21 @@
</para>
<para>
The abstract classes AntResponse and DeviceCapabilities are implemented internally to support the class library.
UsbAntDeviceCapabilities and UsbAntResponse are the concrete implementations of the abstract classes.
UsbAntResponse and UsbAntDeviceCapabilities are the concrete implementations of the abstract classes.
</para>
</introduction>

<section>
<title>Handling Power Events</title>
<content>
<para>
The AntUsbStick configuration is reset when the power is removed from the device and then restored. This typically
occurs when the PC goes to sleep or the lid is closed. The client application must re-initialize the AntUsbStick
configuration when power is restored if the client resumes execution.
</para>
</content>

</section>
<!-- Add one or more top-level section elements. These are collapsible.
If using <autoOutline />, add an address attribute to identify it
and specify a title so that it can be jumped to with a hyperlink. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,18 @@
<content>
<para>
The global timeout setting can come from a variety of sources such as the command line or appsettings.json.
Two options are available - <system>MissedMessages</system> and <system>Timeout</system> Timeout is in milliseconds and MissedMessages is the
Two options are available - <system>MissedMessages</system> and <system>Timeout</system>. Timeout is in milliseconds and MissedMessages is the
number of messages missed before signalling the ANT device is considered offline. If no timeout setting
is specified the timeout will default to 8 missed messages. Timeouts can be disabled by setting <system>Timeout=-1</system>. This is
equivalent to Timeout.Infinite.
</para>
<alert class="note">
<alert class="warning" title="Disabling Timeouts">
<para>
Disabling timeouts is <system>NOT</system> recommended. It can lead to unintended consequences such as sending a
message to a device that is no longer present. This can cause a radio channel to be blocked indefinitely.
</para>
</alert>
<alert class="note">
<para>Prefer MissedMessages as this will scale the timeout based on the broadcast rate of specific ANT devices.</para>
</alert>
<para>Setting the option from the command line: <system>--TimeoutOptions:MissedMessages=8</system>.</para>
Expand All @@ -96,7 +102,7 @@
<para>
Support for ANT+ devices not supported by the ANT+ Class Library can be added to the DI container and
device types that support multiple implementations will implement this interface and add it to the DI container.
It is added to the DI contain with the AddKeyedSingleton() method with the device class value specified
It is added to the DI container with the AddKeyedSingleton() method with the device class value specified
as the key. For example - <codeInline>AddKeyedSingleton&lt;ISelectImplementation, SelectBicyclePowerImplementation&gt;(BicyclePower.DeviceClass);</codeInline>
</para>
<para>Here's the SelectBicyclePowerImplementation class -</para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
<link xlink:href="724ada0f-d2e9-49df-b466-96568945f5c9" />
</para>
</listItem>
<listItem>
<para>
<link xlink:href="d3c019fb-0c05-409e-9283-c72089d4df8c" />
</para>
</listItem>
</list>
</content>
<!-- If a section contains a sections element, its content creates
Expand Down
Loading