Skip to content

Added deck command for listing decks with revision and serial - #18

Merged
evoggy merged 1 commit into
mainfrom
evoggy/deck-list
Sep 24, 2026
Merged

evoggy merged 1 commit into
mainfrom
evoggy/deck-list

Conversation

@evoggy

@evoggy evoggy commented Sep 24, 2026

Copy link
Copy Markdown
Member

Adds a deck command with a list sub-command, showing the decks attached to
the Crazyflie with their board revision and serial number:

$ cfcli deck list
Name           | Rev | Serial
---------------|-----|-------------------------
bcFlow2        | A   | 0DD07B8E0000002D
WiFi camera de | G   | 7E0048001250465753393020

Decks are found through their identity memory, and both kinds are covered:

  • OneWire — name and revision from the memory elements, serial is the
    1-wire ROM id of the memory chip (8 bytes).
  • DeckCtrl — name and revision parsed from the info page at address 0
    (magic validated), serial is the unique CPU id of the controller (12 bytes).

The serial number is reported in the memory info packet, so a deck whose memory
can't be read is still listed with its serial and ? in the fields that
couldn't be read. The reason is printed on stderr, so it doesn't disturb
--csv output.

--csv emits name,revision,serial. Documentation in docs/deck.md.

Tested against a Crazyflie with one deck of each kind attached.

On the table formatting

param list and log list already print col | col with a dashed rule, but
with hardcoded column widths that overflow when a value is longer than the
column. This PR adds print_table() in utils::display, which sizes columns
to their content, and uses it for deck list.

Converting param, log, mem and lps to a shared table renderer is a
follow-up — possibly using tabled instead of hand-rolling it, which would
also fix display width for wide characters. Deliberately left out of this PR.

@evoggy
evoggy merged commit 3288e2e into main Sep 24, 2026
1 check passed
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.

1 participant