Conversation
ataffanel
marked this pull request as ready for review
August 31, 2026 13:03
ataffanel
requested review from
evoggy and
stefanthorstenson
and
a lite review from Copilot
August 31, 2026 13:03
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for “sourced console” discovery and streaming on top of the existing legacy Crazyflie console behavior, including CSV output for catalog listing and bounded cleanup on exit.
Changes:
- Add
console --list-sources(human/CSV) andconsole --source <PATH>(replay history + live streaming) flows. - Update command classification and cleanup logic to treat sourced-console streaming correctly and disable an enabled source before disconnecting.
- Document the new UX and add focused unit tests around argument behavior and source-path rendering.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/modules/console.rs | Implements source catalog listing, not-found errors, and single-source streaming (replay + live). |
| src/main.rs | Routes new console flags, adjusts streaming-command detection, and adds bounded disable-on-exit cleanup. |
| src/cli.rs | Adds --source / --list-sources flags and clap conflict rules. |
| README.md | Documents sourced-console discovery/streaming and updates --csv coverage list. |
| docs/console.md | Adds detailed sourced-console UX docs and timeout/cleanup behavior. |
| Cargo.toml | Bumps crazyflie-link and pins crazyflie-lib to a git rev with sourced-console support. |
| Cargo.lock | Updates lockfile for dependency changes and bumps cfcli version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+89
to
+90
| *enabled_source = Some(selector); | ||
| cf.console.enable(selector).await?; |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds sourced console support to
cfcli, so users can discover and read output from Crazyflie sources such as the Camera Deck. It makes deck startup and runtime messages available from the CLI through CRTP protocol 13 while keepingcfcli consolefocused on the Crazyflie's local console.cfcli console --list-sourcesprints the advertised source paths in a table or CSV.cfcli console --source PATHenables one source by its exact path, replays available output, and continues streaming live output. Formatted and raw output are supported. Local--preserve-consolehistory still applies only to the Crazyflie's local console.The pinned
crazyflie-lib-rsrevision follows the current firmware response format and can retain packets received before catalog discovery. Those packets appear when their source is enabled, so replay may include output from an earlier connection. The library keeps a 64 KiB budget for these early packets and cannot recover packets lost over radio. On timeout or interruption,cfclimakes a bounded attempt to disable the selected source before disconnecting.Related work
Verification
On commit
ba3ad3b:cargo test --locked --offlinepassed: 19 tests, including the process-signal cleanup test, when run outside sandbox process isolation.cargo build --locked --offlinepassed.git diff --checkpassed.Earlier hardware acceptance covered source listing, replay and live output, disable and re-enable, missing-source reporting, and the local console with the previous library pin. The new protocol parser and reconnect buffering have not been tested through
cfclion hardware.Before merge
crazyflie-lib-rsversion containing sourced console support.