Repository navigation
Bumped to version 0.16.0 and bumped dependencies - #41
Merged
Merged
Conversation
zip 9 returns the entry name as a Result, so the firmware archive reads it once per entry and fails on a name that can't be decoded.
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.
Prepares the 0.16.0 release: PRs #21–#40 since 0.15.0. Most of them add features (swarms, signing in and sharing, stored lighthouse configs), and some text output changes (
log printis a table now, new exit codes 50 and 60), hence a minor bump.Changes
ZipFile::name()now returns aResult, soFirmwareArchive::from_zipreads the name once per entry and fails on a name that can't be decoded.cargo update: the newer octocrab no longer pulls in a set of crypto crates, soCargo.lockis about 575 lines shorter.Testing
cargo build --releaseandcargo test(82 tests) pass. Clippy has no new warnings.FirmwareArchive::from_zipreadfirmware-cf21bl-2026.08.zipwith zip 9 and extracted all 7 binaries with their names and versions. This was a throwaway test, not committed.Release notes (draft)
0.16.0 release notes
This release is mostly about swarms. cfcli can now store lists of Crazyflies,
run commands on all of them at once, and share swarms and lighthouse
configurations with the people you fly with.
New features
Swarms — a swarm is a named list of Crazyflies, each with a short name,
stored in the same YAML format as
Swarmkeeper so a file can move
between the two.
swarm configmanages them (list,select,create,delete,show,name,add,remove,rename,import,export,move),swarm scanshows which Crazyflies answer, andselect --from-swarm CF-02selects one of them for all the other commands.See docs/swarm.md.
swarm config addtakes URIs,--scan, or--from-usb(the oneUSB-attached Crazyflie), and asks for a name when a single Crazyflie is added.
Swarm IDs and Crazyflie names complete in bash, zsh and PowerShell.
Any Crazyradio:
radio:///— a URI with the radio left empty means "anyCrazyradio". A single Crazyflie gets the first Crazyradio that can be opened,
so cfcli keeps working while another program holds radio 0. A swarm is spread
over all attached Crazyradios, and Crazyflies on the same channel, or on
channels less than 2 apart, always share one, so two radios never transmit on
the same channel.
radio://0/is rewritten toradio:///when Crazyflies areimported or added to a swarm; other radio indices are kept.
Commands on a whole swarm — these run on every Crazyflie in the selected
swarm, or on the ones picked with
--cf,--excludeor--swarm:swarm platform info | reboot | power-off | sleep | wakeupswarm param get | set | store | clearswarm log print--onceswarm deck list,swarm debug assertswarm bootload info | flashswarm rechannelswarm lh check | writeListings look like the normal ones with a
CFcolumn in front, and--csvrows start with
cf,uri. A Crazyflie that fails doesn't stop the others; itserror goes to stderr with its name in front. The exit code is 0 when all
succeed, the usual code when all fail the same way (10 when none answer), and
the new 50 otherwise.
Each Crazyradio talks to up to 8 Crazyflies at a time, and log and parameter
TOCs are downloaded once per firmware instead of once per Crazyflie (3.2 s
cold and 0.6 s warm for
swarm platform infoon 3 Crazyflies).Flashing a swarm —
swarm bootload flashtakes the same--release,--zip,--binand--targetsasbootload flashand flashes theCrazyflies one after another, with a summary table at the end. A release is
downloaded for each platform in the swarm, and everything is prepared before
the first Crazyflie is touched, so a wrong
--zipstops the command instead offailing halfway. STM32 and nRF51 images given with
--binare only flashedwhen all the Crazyflies have the same platform;
--platformflashes oneplatform at a time in a mixed swarm.
swarm bootload infoshows the bootloader versions of each Crazyflie andrestarts it back into its firmware. Its
Broadcastcolumn tells whether bothbootloaders support broadcast flashing (bootloader protocol 0x11), which is in
preparation; this release flashes one Crazyflie at a time.
Spreading a swarm over several channels — Crazyflies on one channel share
one Crazyradio, so a swarm on a single channel can only use one.
swarm rechannel --count 3(channels 80, 78 and 76) or--channels 80,76,72gives each channel an equal share, keeps Crazyfliesthat are already on one of the channels where they are, and refuses a plan
that would put two Crazyflies with the same address on one channel. The plan
is shown and confirmed first (
--dry-runstops there,--yesskips thequestion). Each Crazyflie that moves is reprogrammed, rebooted and found on
its new channel before its URI in the swarm file changes, so running the
command again after an interruption finishes the job.
Sharing swarms and lighthouse configurations —
auth loginsigns cfcli into a server through the browser, with nothing to copy (
auth status,auth logout). Signed in, swarms on the server sit next to the local ones as<organization>/<swarm>, and every swarm command takes either kind of ID.swarm config move lab org/labshares a local swarm, and moving it back takesit back. The default server is https://arc.bitcraze.io;
--serversigns in toanother one. See docs/auth.md.
With sync on (
settings sync on, the default), commands check the serverfirst and upload changes right away, and a change someone else made in between
is kept. With sync off,
pullandpushsync by hand. Without the server,commands work on this computer's copies and upload the changes later, so
working with the Crazyflies never waits for the network. When you change your
ID for an organization on the server, cfcli moves its copies and the selected
swarm to the new ID.
Stored lighthouse configurations — lighthouse configurations can be stored
like swarms, locally as
<config>or shared as<org>/<config>:lh config list,save(the Crazyflie's configuration),import,export(a file the Crazyflie client opens),
name,delete,move,pullandpush.display,writeandchecktake a stored configuration, a file(
-i) or YAML on stdin. See docs/lighthouse.md.A swarm can name the configuration it flies in (
swarm config lh).swarm lh checkcompares every Crazyflie with it, andswarm lh writewritesit to the Crazyflies that don't have it yet and reads it back:
Comparing lighthouse configurations —
lh config checkcompares theCrazyflie's configuration with a file or a stored one, per base station: how
far the geometry moved and turned, and whether the calibration belongs to
another base station. A difference exits with the new code 60, so a
script can act on it.
--csvis supported.One log sample —
log print --oncereads one sample, prints it as a tableand stops;
--csvgives the header and the first row. Seedocs/logging.md.
Radio URIs of USB-attached Crazyflies —
scan --from-usbreads the radioconfiguration of every USB-attached Crazyflie and prints its radio URI,
without selecting it the way
select --from-usbdoes:Restarting the STM32 into USB DFU —
platform dfurestarts the STM32 intoits ROM bootloader over the radio, without holding the power button, and
waits for it to show up on USB (
0483:df11).platform rebootbrings it back.This needs nRF51 firmware with
crazyflie2-nrf-firmware#126,
which is not in a firmware release yet. See docs/platform.md.
GAP8 as a flash target — the AI-deck's GAP8 (
bcAI:gap8-fw) can now beflashed.
Bug fixes
bootload infoshows the real bootloader protocol version — the versionwas read from the byte that echoes the command, so every bootloader reported
Protocol Version: 16(0x10). It is now read from the right byte (0 forbootloaders from before it existed), and the CPU ID is shown in full instead
of its first 2 bytes.
Entering the bootloader no longer hangs — the warm boot behind
bootload flashandbootload infoasked the firmware for its bootloaderonce, and could wait forever if that request or its answer was lost. It now
asks again every 200 ms and gives up with an error after 2 s.
The AI-deck boot delay is applied when flashing decks — the AI-deck was
never detected, so the delay it needs to boot between deck flashes was
skipped. It is now detected from the deck's 1-wire memory, the same way the
nRF51 firmware does.
Lighthouse configuration files open in the Crazyflie client —
lh config readsaved files asversion: '2', which cflib refuses. Files arenow written as
version: '1'(the format is the same), and files written byearlier versions are still read.
(#34)
Improvements
Streamed log samples are printed as a table —
log printprinted eachsample as
LogData { timestamp: …, data: {…} }, with the variables in adifferent order on every line. It now prints a header once and a row per
sample, with the Crazyflie's time and the values in the order they were asked
for. Floats get 3 decimals and are right-aligned so the columns don't jump;
--csvis unchanged and keeps full precision.A protocol version mismatch now says how to recover — firmware too old
for this cfcli can't be asked to reboot into its bootloader over a link that
won't come up, so the error is now followed by a hint to flash it cold:
Firmware newer than the CLI gets the opposite advice: update cfcli. The exit
code is unchanged at 10.
Lighthouse configuration files are checked before connecting — the type,
the version and the base station IDs and values are checked first. Only
Lighthouse V2 base stations are supported, so a file with
systemType: 1isrefused. cfcli reads the number of base stations the firmware supports (4 by
default, up to 16) from the lighthouse memory, and refuses to write IDs the
firmware doesn't have before writing anything. Base stations are written in ID
order, so reading the same configuration twice gives the same file.
Updated dependencies — including zip 9 and base64 0.23. No change in
behaviour.
Changes that can affect scripts
log printprints a table instead of oneLogData { … }line per sample.Scripts should use
--csv, which is unchanged.select --from-usbno longer prints theRead radio config: …line; theSelected:line after it has the same information.bootload inforeports the real bootloader protocol version instead ofalways 16.
and 60 when
lh config checkorswarm lh checkfinds differences.--platformforbootload flash --coldexits 30 (invalidvalue) instead of 1.