Development¶
How to create and modify aircraft deck configurations.
Project structure¶
cockpitdecks-configs/
├── decks/ # Aircraft configurations
│ └── cirrus-sr22/
│ ├── README.md # Aircraft-specific notes
│ └── deckconfig/ # Symlinked into X-Plane aircraft folder
│ ├── config.yaml # Aircraft-level config
│ └── 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
├── scripts/ # Repo support 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 fragments 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.
Aircraft documentation¶
Aircraft-specific documentation should live in each aircraft folder as README.md.
Prefer maintaining:
- install notes
- supported layouts
- page summaries
- aircraft-specific dependencies
Avoid rebuilding a separate generated docs layer unless there is a clear need for it again.
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"
}
}