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(objectfled): preserve the active frame on show timeout - #5488
When a Teensy ObjectFLED show() times out waiting for the active DMA frame, drop the newly queued frame and let poll() finish the active transfer. A channel queued again while it is still transmitting keeps its in-use flag until the active transfer completes.
The host regression holds DMA busy across a second show(). It reproduced an unexpected second submission before the fix and now verifies that the original frame drains, newly queued buffers are released, and a later frame can start. The focused ASan/UBSan run and changed-file lint passed. Full C++ validation is running. No Teensy was available for a physical loopback run.
Summary by CodeRabbit
Bug Fixes
Prevented new frames from starting while the driver is still processing an active frame. Queued channels remain available to send once the driver is ready again.
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
When waitForReady() fails, show() now releases queued channels that are not transmitting, clears the enqueue queue, and returns without starting the frame. A unit test checks channel state and peripheral instance creation during frame draining.
Changes: Teensy 4 ObjectFLED readiness handling
Layer / File(s)
Summary
Handle show() while the driver is busy src/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp.hpp, tests/unit/platforms/arm/teensy/teensy4_common/drivers/objectfled/channel_engine_objectfled.cpp
show() now returns when waitForReady() fails and releases queued channels that are not transmitting. The test checks that the active channel remains in use, the new channel remains unused, and a second peripheral instance is created only after the queued channel is shown again.
This change stops a second frame from being submitted while the active Teensy ObjectFLED DMA transfer is still draining, and it adds a regression test for that case. No remaining merge-blocking issues were found.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "fix(objectfled): preserve the active frame on show timeout" matches the main change. The objectives say show() timing out while a DMA frame is active should drop the newly queued frame and …
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 "fix(objectfled): preserve the active frame on show timeout" matches the main change. The objectives say show() timing out while a DMA frame is active should drop the newly queued frame and let poll() finish the active transfer. The summary confirms show() now checks waitForReady() and returns without starting the new frame when not ready, and a test covers the active frame being kept. The title names the component, the fix type, and the behavior being preserved, so it is specific and accurate.
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.
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 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.
Related to #5356.
When a Teensy ObjectFLED
show()times out waiting for the active DMA frame, drop the newly queued frame and letpoll()finish the active transfer. A channel queued again while it is still transmitting keeps its in-use flag until the active transfer completes.The host regression holds DMA busy across a second
show(). It reproduced an unexpected second submission before the fix and now verifies that the original frame drains, newly queued buffers are released, and a later frame can start. The focused ASan/UBSan run and changed-file lint passed. Full C++ validation is running. No Teensy was available for a physical loopback run.Summary by CodeRabbit