Development¶
How to create and modify aircraft deck configurations.
Project structure¶
cockpitdecks-configs/
├── decks/ # Aircraft configurations
│ └── cirrus-sr22/
│ └── deckconfig/ # Symlinked into X-Plane aircraft folder
│ ├── config.yaml # Aircraft-level config
│ ├── _docs.yaml # Documentation metadata
│ └── loupedecklive1/ # Layout for a specific deck
│ ├── config.yaml # Layout defaults (fonts, colours, home page)
│ ├── index.yaml # Home page
│ ├── engine.yaml # Functional pages
│ └── encoders/ # Encoder sub-pages
├── modules/ # Reusable page configs (radio, engine, etc.)
├── decktypes/ # Deck type YAML definitions
├── scripts/ # Doc generation scripts
└── mkdocs.yml
Config hierarchy¶
Configs follow a hierarchy: Aircraft → Layout → Page → Button.
Aircraft config¶
The top-level config.yaml in each deckconfig/ folder defines the aircraft
and which decks it supports:
aircraft: Cirrus SR22
icao: SR22
decks:
loupedeck1:
type: LoupedeckLive
layout: loupedecklive1
brightness: 80
It can also include global dataref rounding settings to reduce WebSocket churn.
Layout config¶
Each layout folder (e.g. loupedecklive1/) contains its own config.yaml
with display defaults:
default-label-font: DIN Condensed
default-label-size: 14
default-label-color: white
default-label-position: ct
default-home-page-name: index
Page files¶
Each .yaml file in the layout folder defines a page of buttons. Pages can
include shared modules and encoder sub-pages:
name: switches
includes: pager, encoders/encoders_fcu
buttons:
- index: 0
type: push
command: sim/electrical/battery_1_toggle
label: "BAT"
formula: ${sim/cockpit2/electrical/battery_on[0]}
Button types¶
| Type | Description |
|---|---|
page |
Navigates to another page |
push |
Single command on press |
begin-end-command |
Command on press and release (for multi-position switches) |
none |
Display only, no interaction |
Buttons use formula with ${dataref} syntax to read live state from X-Plane.
Adding a new aircraft¶
- Create a folder under
decks/matching the X-Plane aircraft directory name - Add a
deckconfig/folder with aconfig.yaml - Create a layout folder for your deck (e.g.
loupedecklive1/) - Add a layout
config.yamlwith display defaults - Add page
.yamlfiles for each cockpit function - Symlink
deckconfig/into the X-Plane aircraft folder
Tip
Start by copying an existing aircraft config with a similar cockpit. The Cessna 172 SP is a good starting point for GA aircraft.
Using modules¶
Modules are reusable button sets shared across aircraft. They live in the
modules/ directory, organised by deck type:
modules/
├── loupedecklive/ # Loupedeck Live modules
└── streamdeckxl/ # Stream Deck XL modules
Include a module in a page with the includes directive:
includes: pager, encoders/encoders_fcu
See Modules for the full list.
Generating docs¶
The deck overview pages under docs/decks/ are auto-generated. After modifying
configs, regenerate them:
python3 scripts/generate_deck_docs.py
Warning
Do not manually edit files under docs/decks/ — they will be overwritten.
Edit the source configs or _docs.yaml instead.
To preview the docs site locally:
mkdocs serve
VS Code YAML support¶
For YAML validation in VS Code, add the following to your workspace settings:
{
"yaml.schemas": {
"https://json.schemastore.org/mkdocs-1.0.json": "mkdocs.yml"
}
}