Skip to content

Add sourced console support - #13

Open
ataffanel wants to merge 1 commit into
mainfrom
sourced-console
Open

Add sourced console support#13
ataffanel wants to merge 1 commit into
mainfrom
sourced-console

Conversation

@ataffanel

@ataffanel ataffanel commented Aug 24, 2026

Copy link
Copy Markdown
Member

Summary

  • add sourced-console catalog discovery with human and CSV output
  • stream one source by exact catalog path with replayed history and live output
  • preserve the existing legacy console UX and legacy-only local history behavior
  • disable an enabled source with bounded cleanup before disconnecting
  • document the initial single-source UX and add focused unit coverage

Related work

Verification

  • cargo test — 12 tests passed
  • cargo build passed without warnings
  • git diff --check passed
  • hardware acceptance passed on radio://0/22/2M/E7E7E7E7E7 with deck:bcCam
    • catalog discovery in human and CSV modes
    • formatted replay/live streaming
    • raw replay/live streaming, including a trailing partial line at timeout
    • clean disable and re-enable across consecutive runs
    • missing source exits 20 and reports the available path
    • legacy console regression check

Strict repository-wide cargo fmt --all -- --check is currently blocked by extensive pre-existing formatting differences. Strict cargo clippy --all-targets -- -D warnings is blocked by 39 pre-existing findings in unrelated code; no finding concerns this implementation.

Before merge

  • Replace the pinned crazyflie-lib git revision with the released crates.io version containing sourced-console support.

@ataffanel
ataffanel marked this pull request as ready for review August 31, 2026 13:03
@ataffanel
ataffanel requested review from evoggy and stefanthorstenson and a lite review from Copilot August 31, 2026 13:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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) and console --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 thread src/modules/console.rs
Comment on lines +89 to +90
*enabled_source = Some(selector);
cf.console.enable(selector).await?;
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.

2 participants