Skip to content

Commit

Permalink
corrections, desktop publishing, typography (!)
Browse files Browse the repository at this point in the history
  • Loading branch information
devleaks committed Jan 5, 2024
1 parent 48566e0 commit 8d382c9
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 38 deletions.
41 changes: 37 additions & 4 deletions docs/Resources/Button Attribute Default Values.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,56 @@ The Deck will search for a `default-label-color` in its attributes. If it finds

Finally, the Cockpit will return a `default-label-color`. If there is no value for the `default-label-color`, Cockpitdecks will issue an error. It simply means that there is no default value for that attribute and that a value *must* be supplied by the user in the definition of the button.

## Day / Night (or light / dark) Theme

Cockpitdecks attempts to provide a day and a night *theme*. The attribute `cockpit` can be set to `day` (or `light`) or `night`(or `dark`).

```yaml
cockpit-theme: dark
```
The effect is that in `night` (or `dark`) theme, default values prefixed with `dark-` will be favored. If no default value prefixed with `dark-` is found, the regular default value is fetched.

Example for label color:

In `day` mode, the default value for label color is `default-label-color`, as usual.

In `night` mode, the default value `dark-default-label-color` value is first searched, and if not defined, the `default-label-color` is retuned.

> [!NOTE]
> Ultimately, this scheme can be extended to any theme name value, like airbus, or barbie. However, it is advisable to limit theme default values to global appearance parameters like colors, fonts, textures, and sizes.

# Configuration Files

1. Cockpitdecks internals (cannot be modified)
2. Global configuration file: Cockpitdecks/resources/config.yaml
3. Aircraft configuration file: Aircraft/config.yaml
4. Layout configuration file: Aircraft/layout1/config.yaml
5. Page configuration file: Aircraft/layout1/page1.yaml

# Notes About Configuration Values Melting

Sometimes, configuration values can be specified at different level for a given entity.
## Cockpitdecks (Application), Cockpits

At the highest level, a Cockpit will start with a set of default values provided in its code.
It will then loads additional parameters in a global resource configuration file.

It will then loads additional parameters in a global resource configuration file. That file is the same for ALL aircrafts. The config.yaml file is located in the home directory of Cockpitdecks software, in the *resources* folder.

Next, Cockpitdecks will look for an aircraft specific configuration file, in the deckconfig folder of that aircraft. It will load the config.yaml file of that aircraft, and default values loaded from there will apply to that aircraft only.

## Decks and Layouts

A Deck will start with the configuration attributes supplied by the Cockpit. The Cockpit uses the configuration passed in the the global, aircraft-level configuration file.

A deck will later read an optional configuration file located in the folder of the Layout it will use.
The attributes specified in the layout configuration file will take precedence over those at the deck level.
A deck will load a Layout. When doing so, the deck may read an optional configuration file located in the folder of the Layout it will use. The attributes specified in the layout configuration file will take precedence over those at the deck level.

## Pages and Includes

In addition to button definitions, a Page contains other page-level attributes.

Since a page can include other pages, the included page attributes will **overwrite** the attributes of the page.
When a page includes another page, their respective attributes get *melted* (combined). The attributes of the included page **overwrite** the attributes of the base page.

Since a page can include more than one other page, the attributes of the included page are added (on top of) the attribute of the base page and other included pages. But since the order of page inclusion is not specified, attributes may be piled up in any order.

In other words, it is advisable to not include any page-level attribute in a page that will be included in another page, it may lead to unexpected behavior or presentation. It is safer to limit inclusion to the `buttons` attribute, where buttons of main page and included page are merged together.
82 changes: 50 additions & 32 deletions docs/Resources/Drawn Buttons.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,22 @@ Switches, Circular Switches, and Push Switches have numerous attributes in commo
### Switches as Drawn
![[switches-design.png]]
### Options

`options: 3way`
Defines a switch with 3 positions, 2 extremities, and one middle position.

`options: horizontal`
Draws and manipulates the switch horizontally rather than vertically.

`options: hexa`
Draws an hexagonal base to mimic Airbus switch inserts and fixation instead of a round base (default).

`options: invert`
Inverts On and Off positions.

# Circular Switch
A Circular Switch is a rotating knob/switch used to represent a rotation switch. It is displayed on an image key. Circular switches are often used by Up/Down activation to cycle and bounce through the set of possible values.

They can be used in replacement of multi-icons.

```
Expand All @@ -70,27 +75,28 @@ They can be used in replacement of multi-icons.
```

## Attributes
Button-size
Button-stroke-color
Button-fill-color
Button-underline-color
Button-underline-width
Needle-color
Needle-width
Needle-underline-color
Needle-underline-width
Stops
Tick-labels
Label-font
Label-color
Label-size
Tick-color
Tick-width
Thik-underline-color
Thik-underline-width
Label-space
Thik-Space
Top, bottom, left, right

- Button-size
- Button-stroke-color
- Button-fill-color
- Button-underline-color
- Button-underline-width
- Needle-color
- Needle-width
- Needle-underline-color
- Needle-underline-width
- Stops
- Tick-labels
- Label-font
- Label-color
- Label-size
- Tick-color
- Tick-width
- Thik-underline-color
- Thik-underline-width
- Label-space
- Thik-Space
- Top, bottom, left, right

### Circular Switch Models

Expand All @@ -100,12 +106,13 @@ Top, bottom, left, right
![[rotating-selector-design.png]]
![[circular-switches.png]]
# Push Button
`button-size`
`button-color`
`button-off-color`
`witness-fill-color`
`witness-stroke-color`
`witness-stroke-width`

- `button-size`
- `button-color`
- `button-off-color`
- `witness-fill-color`
- `witness-stroke-color`
- `witness-stroke-width`

A PushButton is a simple button that can be used to trigger a command. It can be On or Off, and it's state can be reflected graphically by adjusting its color for instance.

Expand All @@ -119,15 +126,20 @@ Knobs are circular rotating buttons used to set values by rotating the button cl
So we shall just say that Knob icons can be used as simple push button, with an alternative representation.

# Data

A DataButton is a particular case of a display only button.

![[data.png]]

A DataButton displays four informations:

1. A single letter or icon from a character font, (we can use icon fonts,)
2. A value, and optionally the trend of the value (rising, decreasing, statuquo)
3. A unit short text (static)
4. An optional percentage bar of the value relative to a 100% value
5. A small text string (typically ~20 characters maximum) called the bottom line.


```
- index: 4
name: Fuel Level
Expand Down Expand Up @@ -156,21 +168,23 @@ Data button representation aims at providing a dashboard-like single value highl

Decor representation displays simple connected lines to populate unused icons. They can be used to display visual helper lines that connect annunciators (bleed air, hydraulics, etc.) The idea behind Decor icons is to provide a quick alternative to blank icons when filling large decks with numerous keys.

![[decor-real.jpeg]]

Decor icon are governed by two parameters `type` and `code`. The type is a category of drawings. The code determine which drawing will be made in that category.

## Lines

`type: line`

Decor icons of type `line` display a single horizontal or vertical line, and corner angles. The `code` determine which line get drawn.

![[decor.png]]

```
type: line
code: H
```

![[H.png]]
## Segments

`type: segment`

Decor icons of type `segment` display segments that are present in the `code` attribute.
Expand All @@ -182,12 +196,15 @@ code: BGNSIL0123
```
will light (turn on) segments B, G, N... 3, which correspond will result in a drawing like the one proposed by the `H` code in type `line` above.

![[I0123LBGNS.png]]
## Common Decor Attributes

### Line width

`width: 10`
Width of the line.
### Color

`color: red`
Color of the line.

Expand All @@ -209,14 +226,17 @@ If a `set-dataref` is present, the aircraft representation increases the value o
(Please refer to the dedicated [[Weather|Weather Representation]] page.)

## METAR

The WeatherButton is a special data button that displays METAR information of the station closest to the aircraft in a small, iconic representation.


```
- index: 8
name: METAR
type: weather
station: OTHH
```

![[weather.png]]

## TAF
Expand All @@ -225,8 +245,6 @@ The WeatherButton is a special data button that displays METAR information of th

## Current X-Plane Weather


### Region


### Aircraft
5 changes: 3 additions & 2 deletions docs/Resources/Weather.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Cockpitdecks offers different types of Weather Representation, mainly on icons.

These Representations, together with accompanying custom [[Cockpitdecks Internals#Dataref Collector|Activations]], have led to development of highly customised activations and representations to exhibit the potentials of Cockpitdecks.
These Representations, together with accompanying custom [[Cockpitdecks Internals#Dataref Collector|Activations]], have led to development of highly customized activations and representations to exhibit the potentials of Cockpitdecks.

While some Representations remain highly generic, like graphical representation of METAR at the closest station, some others are highly specific like those that represent X-Plane simulated weather.

Expand Down Expand Up @@ -28,6 +28,7 @@ This is done by fetching a limited set of values from the weather-related datare

There are two *modes*: `aircraft` and `region`.


# XP Weather

```
Expand All @@ -41,4 +42,4 @@ There are two *modes*: `aircraft` and `region`.

This representation fetches all weather-related datarefs from the simulator (wind layers, cloud layers, weather conditions, more than 100 datarefs) for a location or region and attempt to automagically generate a METAR from the collected data.

To collect and monitor such an amount of datarefs, Cockpitdecks designed the [[Simulator#]].
To collect and monitor such an amount of datarefs, Cockpitdecks designed [[Button Value#Dataref Sets|Dataref Sets]].
Binary file added docs/images/H.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/I0123LBGNS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/decor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/segments.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/streamdeckplus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8d382c9

Please sign in to comment.