Skip to content

Logging and AntPlus Updates - #137

Merged
StephenHidem merged 6 commits into
masterfrom
DataPageTrace
Jun 15, 2026
Merged

Logging and AntPlus Updates#137
StephenHidem merged 6 commits into
masterfrom
DataPageTrace

Conversation

@StephenHidem

Copy link
Copy Markdown
Owner

PR Classification

API change and dependency update to improve resource management, logging clarity, and documentation.

PR Summary

This pull request introduces breaking API changes, enhances logging with device context, updates dependencies, and improves documentation.

  • AntDeviceCollection.cs: Implements IDisposable, requiring explicit disposal for resource cleanup.
  • LoggerExtensions.cs: Changes public method signatures to include DeviceNumber and page index, updates log messages, and removes noisy ANT response logging.
  • AntDevice.cs and related device profile files: Updates logging calls to match new LoggerExtensions signatures.
  • Updates all NuGet dependencies to latest versions across projects.
  • Documentation and version history: Adds v7.0.0.0 entry, notes on versioning, and highlights a new Docker/Tailscale example project.

Removed ANT response logging from MessageHandler to reduce log noise. Updated Microsoft.Extensions.Hosting to 10.0.9 and Microsoft.Maui.Core to 10.0.71. Bumped version to 2.0.7 and updated release notes.
Breaking: AntDeviceCollection now implements IDisposable for proper resource cleanup. Logging methods and event signatures updated to include DeviceNumber and page indices for better multi-device support. Refactored LoggerExtensions and updated all usages. Removed obsolete logging code. Updated Microsoft.Extensions.* dependencies to 10.0.9. Incremented version to 7.0.0 and updated release notes.
Updated NuGet packages across projects, including Microsoft.Extensions.Hosting, Google.Protobuf, Grpc.Tools, CommunityToolkit.Maui, and Serilog.Settings.Configuration. Adjusted CrankTorqueFrequencySensorTests to match new log message formats. Bumped AntUsbStick version to 4.1.4. Removed redundant early Serilog initialization in MainWindowViewModel.cs.
Added documentation for AntPlus 7.0.0.0, including a new version history entry and release notes for breaking changes (IDisposable on AntDeviceCollection, LoggerExtensions signature updates, NuGet updates). Updated project and content layout to reference the new version.
Added a new example in the "Examples" section describing the MauiTailscaleGrpc project, which demonstrates using Docker and Tailscale to securely connect an ANT+ server on Windows with a .NET MAUI app on Windows and Android. Included a GitHub link and instructions to refer to the README for setup details.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces breaking changes for version 7.0.0, notably making AntDeviceCollection implement IDisposable for proper resource cleanup and updating several logging methods in LoggerExtensions to include the DeviceNumber parameter. It also removes noisy ANT response logging and updates various NuGet dependencies across the solution. The code review identified several key issues: a logic error in CommonDataPages.cs where an enum value is incorrectly passed as a page index, a potential issue in LoggerExtensions.cs where Enum.GetName may return null when passed a byte directly, a recommendation to mark AntDeviceCollection as sealed to comply with CA1063, and a resource leak concern where active AntDevice instances are not disposed of when the collection is disposed.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread AntPlus/CommonDataPages.cs Outdated
Comment thread AntPlus/Extensions/Logging/LoggerExtensions.cs
Comment thread AntPlus/AntDeviceCollection.cs Outdated
Comment thread AntPlus/AntDeviceCollection.cs
@StephenHidem
StephenHidem merged commit cc9a68b into master Jun 15, 2026
5 checks passed
@StephenHidem
StephenHidem deleted the DataPageTrace branch June 15, 2026 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant