Skip to content

Use crazyflie-link and crazyradio through the crazyflie-lib re-exports#12

Open
gemenerik wants to merge 2 commits into
mainfrom
rik/use-crazyflie-lib-reexports
Open

Use crazyflie-link and crazyradio through the crazyflie-lib re-exports#12
gemenerik wants to merge 2 commits into
mainfrom
rik/use-crazyflie-lib-reexports

Conversation

@gemenerik

Copy link
Copy Markdown
Member

crazyflie-lib 0.8.1 re-exports crazyflie-link, which re-exports crazyradio, so the exact versions the lib was built against are reachable as crazyflie_lib::crazyflie_link and no longer need to be direct dependencies kept manually in sync. The packet_capture feature is enabled through the new crazyflie-lib passthrough feature, still for Unix targets only.

Also routes the two arming requests through the supervisor subsystem: 0.8.1 deprecates Platform::send_arming_request in favor of the functionally identical Supervisor::send_arming_request (same packet on the wire). Note that arming is still under "high level commander" functionality which it is unrelated to imo.

No CLI or behavior changes. Verified with cargo check with and without default features, zero warnings.

crazyflie-lib 0.8.1 re-exports crazyflie-link (which re-exports
crazyradio), so the exact versions it was built against are reachable
as crazyflie_lib::crazyflie_link and no longer need to be direct
dependencies kept manually in sync. The packet_capture feature is
enabled through the new crazyflie-lib passthrough feature, still for
Unix targets only.
crazyflie-lib 0.8.1 deprecates Platform::send_arming_request in favor
of the functionally identical Supervisor::send_arming_request.

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

Updates cfcli to rely on crazyflie-lib’s re-exports for link/radio crates and aligns a couple of call sites with the updated crazyflie-lib API surface.

Changes:

  • Switches crazyflie_link / crazyradio usages to crazyflie_lib::crazyflie_link re-exports across modules.
  • Routes arming/disarming requests via Supervisor::send_arming_request instead of the deprecated platform API.
  • Simplifies dependencies by removing direct crazyflie-link/crazyradio entries and bumping crazyflie-lib to 0.8.1.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/modules/test.rs Updates LinkContext type references to use the crazyflie-lib re-export.
src/modules/crazyradio.rs Imports crazyradio types via crazyflie-lib re-exports.
src/modules/bootloader.rs Switches link imports to crazyflie-lib re-export and updates public function signatures accordingly.
src/main.rs Updates link context creation/init paths and switches arming/disarming to cf.supervisor.
Cargo.toml Removes direct link/radio deps; depends on crazyflie-lib 0.8.1 and enables packet_capture via crazyflie-lib on Unix.
Cargo.lock Reflects dependency updates and version bump to 0.12.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/bootloader.rs
}

pub async fn print_bootloader_info(link_context: &crazyflie_link::LinkContext, cold: bool, uri: &str) -> Result<()> {
pub async fn print_bootloader_info(link_context: &crazyflie_lib::crazyflie_link::LinkContext, cold: bool, uri: &str) -> Result<()> {
Comment thread src/modules/bootloader.rs
}

pub async fn reboot(link_context: &crazyflie_link::LinkContext, uri: &str,) -> Result<()> {
pub async fn reboot(link_context: &crazyflie_lib::crazyflie_link::LinkContext, uri: &str,) -> Result<()> {
Comment thread src/modules/bootloader.rs
}

pub async fn flash(link_context: &crazyflie_link::LinkContext, uri: &str, toc_cache: ConfigTocCache, firmware_upgrade: FirmwareUpgrade, cold: bool) -> Result<()> {
pub async fn flash(link_context: &crazyflie_lib::crazyflie_link::LinkContext, uri: &str, toc_cache: ConfigTocCache, firmware_upgrade: FirmwareUpgrade, cold: bool) -> Result<()> {
Comment thread Cargo.toml
Comment on lines 87 to +88
[target.'cfg(unix)'.dependencies]
crazyflie-link = { version = "0.5.0", default-features = false, features = ["packet_capture"] }
crazyradio = { version = "0.7.0", features = ["async", "packet_capture"] }
crazyflie-lib = { version = "0.8.1", features = ["packet_capture"] }
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