Use crazyflie-link and crazyradio through the crazyflie-lib re-exports#12
Open
gemenerik wants to merge 2 commits into
Open
Use crazyflie-link and crazyradio through the crazyflie-lib re-exports#12gemenerik wants to merge 2 commits into
gemenerik wants to merge 2 commits into
Conversation
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.
Contributor
There was a problem hiding this comment.
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/crazyradiousages tocrazyflie_lib::crazyflie_linkre-exports across modules. - Routes arming/disarming requests via
Supervisor::send_arming_requestinstead of the deprecated platform API. - Simplifies dependencies by removing direct
crazyflie-link/crazyradioentries and bumpingcrazyflie-libto0.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.
| } | ||
|
|
||
| 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<()> { |
| } | ||
|
|
||
| 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<()> { |
| } | ||
|
|
||
| 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 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"] } |
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.
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.