You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(channels): preserve busy drivers on clear or remove timeout - #5493
ChannelManager::clearAllDrivers() previously called waitForReady() and ignored its return value, clearing and potentially destroying drivers whose DMA transfers timed out. It now returns early on timeout so active drivers remain registered until the caller retries.
ChannelManager::removeDriver() previously removed drivers without waiting for active transfers to finish. It now waits for driver->waitForReady(), re-scans mDrivers after task pumping, and returns false on timeout while keeping the busy driver registered.
bash test manager --debug (ASAN/LSAN/UBSAN) — passed (including new clear-timeout and remove-timeout regression tests)
bash test channel --debug — passed
Summary by CodeRabbit
Bug Fixes
Driver removal and clearing now wait for drivers to become ready. If a driver does not become ready within one second, it remains registered, and the operation can be retried once the driver is ready.
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
Parsing warnings: 1
Validation error: Unrecognized key: "enabled" at "reviews.pre_merge_checks"
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
No actionable comments were generated in the recent review.
Walkthrough
Driver removal and clearing now retain registered drivers when readiness waits time out. The documentation describes the timeout behavior, and tests verify that both operations succeed after the driver becomes READY.
Changes: Driver readiness checks
Layer / File(s)
Summary
Readiness checks and registry retention src/fl/channels/manager.cpp.hpp, src/fl/channels/manager.h, tests/unit/fl/channels/manager.cpp
removeDriver() checks that the driver is registered, waits for readiness, and re-scans before removal. clearAllDrivers() stops if waitForReady() fails. Documentation and tests cover timeout retention and retry after the driver becomes READY.
Removing or clearing a busy driver now leaves it registered and returns early, so it can be retried once the driver is ready. Tests cover both operations. No merge-blocking risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the main change: busy drivers are kept registered when clearAllDrivers or removeDriver hits a readiness timeout. The raw summary and objectives describe exactly this behavior change in…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title names the main change: busy drivers are kept registered when clearAllDrivers or removeDriver hits a readiness timeout. The raw summary and objectives describe exactly this behavior change in ChannelManager, with matching doc and test updates. The title uses the conventional fix(scope) form and is specific enough for a teammate scanning history.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between bc3caab and cd70a29.
Files selected for processing: 3
src/fl/channels/manager.cpp.hpp
src/fl/channels/manager.h
tests/unit/fl/channels/manager.cpp
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
Change in examples/Blink per target. The left number is this PR's image flash / attributed RAM in bytes; the colored delta is the change from the merge base (red ↑ is larger, green ↓ is smaller, Same is unchanged).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #5356 / #5492 (item #3).
ChannelManager::clearAllDrivers()previously calledwaitForReady()and ignored its return value, clearing and potentially destroying drivers whose DMA transfers timed out. It now returns early on timeout so active drivers remain registered until the caller retries.ChannelManager::removeDriver()previously removed drivers without waiting for active transfers to finish. It now waits fordriver->waitForReady(), re-scansmDriversafter task pumping, and returnsfalseon timeout while keeping the busy driver registered.Verification
bash lint src/fl/channels/manager.cpp.hpp src/fl/channels/manager.h tests/unit/fl/channels/manager.cpp— passedbash test manager --debug(ASAN/LSAN/UBSAN) — passed (including new clear-timeout and remove-timeout regression tests)bash test channel --debug— passedSummary by CodeRabbit