Commit acf519c
authored
Prep for Next Release (#37)
* Remove Dispose call in critical log scenario
The line `Dispose(); // clear the channels` was removed from the method where a critical log message is generated if `ChannelId` is null. This change ensures that the code will no longer call the `Dispose` method to clear the channels in this scenario.
* Refactor AntDeviceCollection and add SendMessageChannel
- Made `AntDeviceCollection` a partial class.
- Added `_sendMessageChannel` field to `AntDeviceCollection`.
- Simplified `AntDeviceCollection` constructor by removing async initialization.
- Added `StartScanning` method to initialize ANT radio and channels.
- Renamed `Channel_ChannelResponse` to `MessageHandler` and updated it.
- Refactored `CreateAntDevice` to use `_sendMessageChannel`.
- Updated `AntPlus.csproj` to version `5.0.0.0`.
- Added `SendMessageChannel` class to manage multiple ANT channels.
- Implemented async data sending and channel management in `SendMessageChannel`.
* Refactor tests and add new logging verifications
Refactored test classes to use mock loggers and updated test methods to be asynchronous. Added new tests for logging critical messages and warnings. Introduced a new `SendMessageChannelTests` class to verify `NotImplementedException` and concurrent method invocations.
* Add release notes and documentation for versions 5.0.0.0 and 1.1.1.0
Updated `AntPlus.csproj` to include new package release notes indicating breaking changes. The `AntDeviceCollection` constructor no longer initiates ANT device scanning; `StartScanning` must be called after instantiation.
Updated `AntPllusVersionHistory.aml` and `HostingExtensionsVersionHistory.aml` to include new list items with links to the new version history.
Updated `ContentLayout.content` to add new topics for versions 5.0.0.0 and 1.1.1.0, marking version 5.0.0.0 as selected.
Updated `Documentation.shfbproj` to re-add namespace summary items and include new entries for the version history files for versions 5.0.0.0 and 1.1.1.0.
Added new files `v5.0.0.0.aml` and `v1.1.1.0.aml` detailing the releases, including breaking changes, improvements, and a fix for a potential race condition.
* Remove ackWaitTime parameter and standardize timeouts
The changes primarily involve the removal of the `ackWaitTime` parameter from various method calls and method signatures. This parameter, which specified the time in milliseconds to wait for device acknowledgment, has been replaced with `It.IsAny<uint>()` in the unit tests and with a default timeout value `_deviceTimeout` in the main code.
In the unit tests within `TrainerStationaryBikeTests.cs`, the hardcoded `500` milliseconds wait time has been replaced with `It.IsAny<uint>()` to make the tests more flexible and less dependent on specific timeout values.
In the `AntDevice.cs` file, the `ackWaitTime` parameter has been removed from the `RequestDataPage` and `SendExtAcknowledgedMessage` methods. Instead, these methods now use the `_deviceTimeout` field to determine the timeout duration.
Similar changes have been made in the `Tracker.cs`, `Parameters.cs`, and `Geocache.cs` files, where the `ackWaitTime` parameter has been removed from method calls and replaced with the default timeout value.
These changes aim to standardize the timeout handling across the codebase, making it more maintainable and consistent.
* Update tests and refactor Geocache functionality
Updated NuGet packages in AntPlus.UnitTests.csproj:
- Microsoft.NET.Test.Sdk to 17.13.0
- MSTest.TestAdapter to 3.7.3
- MSTest.TestFramework to 3.7.3
- coverlet.collector to 6.0.4
GeocacheTests.cs changes:
- mockAntChannel now uses MockBehavior.Loose
- Added tests: EraseGeocache_Success_ReturnsPass and EraseGeocache_Failure_ReturnsError
Geocache.cs changes:
- Refactored ProgramGeocache method: pin is no longer nullable, uses ClearGeocacheState helper, streamlined message assembly, added logging
- Added ClearGeocacheState private method
- Added EraseGeocache public method with detailed logging
* Examples Update - Add EraseGeocacheCommand and related functionality
- Added EraseGeocacheCommand to GeocacheViewModel in MauiAntGrpcClient and WpfUsbStickApp namespaces.
- Introduced EraseGeocache method in GeocacheViewModel to handle geocache erasure.
- Added CanEraseGeocache method to determine if EraseGeocacheCommand can be executed.
- Updated ProgramGeocacheView.xaml and GeocacheWindow.xaml to include buttons for erasing geocaches.
- Changed pin property type from uint? to uint in GeocacheViewModel.
- Added NotifyCanExecuteChangedFor attribute to isBusy property.
* Refactor geocache logic and improve logging
- Updated `EraseGeocache` test in `GeocacheTests.cs` to verify specific byte arrays.
- Removed retry logic in `SendExtAcknowledgedMessage` in `AntDevice.cs`; now logs a warning on failure.
- Refactored `RequestPinPage` in `Geocache.cs` to use new `ClearGeocacheState` method.
- Corrected typo in exception message in `UpdateLoggedVisits` in `Geocache.cs`.
- Updated logging in `ProgramGeocache` and `EraseGeocache` in `Geocache.cs` to use structured logging.
* Refactor methods and update logging in Ant classes
Renamed private methods and updated logging statements in the
AntChannel and AntRadio classes within the SmallEarthTech.AntUsbStick
namespace. Specifically:
- In AntChannel.cs:
- Renamed Channel_ChannelResponse to OnChannelResponse.
- Renamed Channel_DeviceNotification to OnDeviceNotification.
- Changed logging level for OnChannelResponse from LogDebug to LogTrace.
- Updated logging statements to use structured logging with named placeholders.
- In AntRadio.cs:
- Renamed AntDevice_deviceResponse to OnDeviceResponse.
- Renamed AntDevice_SerialError to OnAntDeviceSerialError.
- Updated logging statements to use structured logging with named placeholders.
Updated AntUsbStick.csproj to upgrade Microsoft.Extensions.Logging.Abstractions
package from version 8.0.2 to 9.0.2.
* Clean up logging in various projects.
* Clean up logging.
* Project file updates for hosting and USB stick.
* Updated documentation project content.1 parent f54ee37 commit acf519c
File tree
27 files changed
+363
-137
lines changed- AntPlus.Extensions.Hosting
- AntPlus.UnitTests
- DeviceProfiles
- FitnessEquipment
- AntPlus
- DeviceProfiles
- AssetTracker
- BicyclePower
- Documentation
- Content
- VersionHistory
- AntPlus
- AntUsbStick
- HostingExtensions
- Examples
- AntMulticastServer
- AntUsbStick
- MAUI-gRPC
- AntGrpcService/Services
- MauiAntGrpcClient
- ViewModels
- Views
- WpfUsbStickApp
- ViewModels
- Views
27 files changed
+363
-137
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | 92 | | |
94 | 93 | | |
95 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
357 | 357 | | |
358 | 358 | | |
359 | 359 | | |
360 | | - | |
| 360 | + | |
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
178 | 226 | | |
179 | 227 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
136 | 135 | | |
137 | 136 | | |
138 | | - | |
| 137 | + | |
139 | 138 | | |
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | 142 | | |
144 | | - | |
| 143 | + | |
145 | 144 | | |
146 | 145 | | |
147 | 146 | | |
| |||
153 | 152 | | |
154 | 153 | | |
155 | 154 | | |
156 | | - | |
157 | 155 | | |
158 | | - | |
| 156 | + | |
159 | 157 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
| 158 | + | |
166 | 159 | | |
167 | 160 | | |
168 | 161 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| |||
0 commit comments