Skip to content

Commit

Permalink
misc addition and corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
devleaks committed Sep 25, 2024
1 parent e170324 commit 20773c5
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/Extending/Adding New Deck Models.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Depending on the button's action that is triggered, the deck will programmatical

`swipe`: will produce a complex swipe Event, with the position of the start of the swipe, the end of the swipe and some timing information (timestamps of start and end of swipe).

Technically speaking, the deck will start a thread to listen to incoming events. Interaction will be decoded (which key was pressed, when, how, etc.) and presented to Cockpitdecks for handling as a typed Event.
Technically speaking, the deck will start a thread to listen to incoming events. Interaction will be decoded (which key was pressed, when, how, etc.) and presented to Cockpitdecks as a typed Event.

Depending on the device driver's hardware access, events will either be presented directly to Cockpitdecks, or through a FIFO queue: Driver just enqueues events, Cockpitdecks dequeues events and does the work.

Expand Down
13 changes: 7 additions & 6 deletions docs/Extending/Internals/Deck Internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,13 @@ When rendered in a browser window, web deck interaction means are materialised t

#### Attributes

| Attribute | Definition |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Dimension | The dimension attribute can be a single integer value or a list of two values.<br><br>It determine the size of the button has drawn on the Web deck.<br><br>If the feedback visualisation is an `image`, the `image` attribute specifies the characteristics of the image. `X`is horizontal and correspond to the `width`, `Y` is vertical and correspond to the `height`. |
| layout | Layout of the buttons on the web deck canvas.<br>- Offset<br>- Spacing<br>Buttons will be arranged at regular interval, starting from Offset, with supplied spacing between the buttons. Button sizes are specified in the Dimension attribute. |
| hardware | Configuration information for a specific drawing representation of this hardware button. |
| options | Comma-separated list of options, a single option can either be a name=value, or just a name, in which case the value is assumed to be True.<br><br>`options: count=8,active`<br><br>sets options `count`to value 8, and `active` to True. `active` is equivalent to `active=true`. |
| Attribute | Definition |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Dimension | The dimension attribute can be a single integer value or a list of two values.<br><br>It determine the size of the button has drawn on the Web deck.<br><br>If the feedback visualisation is an `image`, the `image` attribute specifies the characteristics of the image. `X`is horizontal and correspond to the `width`, `Y` is vertical and correspond to the `height`. |
| layout | Layout of the buttons on the web deck canvas.<br>- Offset<br>- Spacing<br>Buttons will be arranged at regular interval, starting from Offset, with supplied spacing between the buttons. Button sizes are specified in the Dimension attribute. |
| hardware | Configuration information for a specific drawing representation of this hardware button. |
| empty-button | Minimal Button definition to create an empty, dummy button. This dummy button will becreated and used to generate an "empty" hardware representation (completely `off`). (In other words, if a button with hardware representation is not defined, this definition will be used to create a button.) |
| options | Comma-separated list of options, a single option can either be a name=value, or just a name, in which case the value is assumed to be True.<br><br>`options: count=8,active`<br><br>sets options `count`to value 8, and `active` to True. `active` is equivalent to `active=true`. |

### Special Button Representation

Expand Down
8 changes: 8 additions & 0 deletions docs/Extending/Simulator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ In addition to the core simulation software, the Simulator also proposes a few a

The simulation software presents to Cockpitdecks all its reachable « values ». Any value that is accessible in the simulation software is made available to Cockpitdecks through the SimulationData. A sophisticated mechanism updates the data in Cockpitdecks every time the data is modified in the simulator.

For example, Laminar X-Plane extensively uses « *datarefs* », while Microsoft Flight Simulator uses « *simvars* ». They both are values coming from the simulator, and they both can be used in Cockpitdecks.

## Local Values

In addition to simulator data, Cockpitdecks maintains its own set of « local » data, data that is not forwarded to the simulator but that can be used like any other simulator data.

# Instructions

Cockpitdecks offers the Instruction, an action that must be carried out in the simulator software, provided that the simulation software allows for « external action » to be accepted.

Again, as an example, Laminar X-Plane has « *commands* » (offered in two modes of operation), and Microsoft Flight Simulator has « *idontknow* ».

# Simulator Core

The Simulator entity is responsible for maintaining a connection to the Simulator software to collect simulator data values and issue instructions.
9 changes: 9 additions & 0 deletions docs/Extending/The New View Attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,18 @@ Command above will be executed 5 seconds after the execution of the activation o
#### Condition

A `condition` attribute is a formula that is executed before he command. If the result of the formula is evaluated to a non null (non zero) value, the command is executed. Otherwise, the command is not executed.

```yaml
command: command/to/execute
condition: ${some/dataref/to/check} 1 -
```

If the result of the computation of the formula is non zero, the command will be executed.

# Processing

Detection of the new parameter value is easy. Either it is a string representing a command to submit to X-Plane, or it is a list of one or more command blocks. There is no ambiguity.

# Usage

The `view` attribute can be used as a test bed for execution of more than one command in a sequence, a kind of execution of « macro » command, with additional features like conditions and delay of execution.
Expand Down
7 changes: 5 additions & 2 deletions docs/Extending/Web Decks.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ In addition to real physical decks, Cockpitdecks offers *Web Decks* rendered in

![[virtualdecks.jpg]]

This is very handy to design layout for deck a developer does not necessary owns.
If a Web Deck is detected in an aircraft configuration, Cockpitdecks will automagically start a basic web server to present the Web Deck to the user. The index (home) page of the web server will present all web decks available to the user. Selecting on web deck will start it in another browser window.

Web decks are very handy to design layout for deck a developer does not necessary owns.

Web decks can be (almost) any physical deck represented in Cockpitdecks (most popular brands and models are actually provided with Cockpitdecks), or any next deck model of your fantasy. As an example and proof of concept, Cockpitdecks comes with a fully operational overhead panel for Toliss A321 neo aircraft. Yes, you read it right, you can have Toliss A321 overhead panel on a touch screen or tablet.

# Web Deck Declaration and Use
Expand Down Expand Up @@ -30,7 +33,7 @@ deckconfig
⊢ custom_background_image.png
```

Virtual decks are defined like any other deck. Their driver must be `virtualdeck`. They contain a few additional attributes to render them on a HTML web Canvas like background image or color.
Virtual decks are defined like any other deck. Their driver must be `virtualdeck`. They contain additional attributes to render them on a HTML web Canvas like background image or color.

```yaml hl_lines="2"
name: Virtual Deck 3×2
Expand Down
Binary file added docs/images/virtual-xtouchmini.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 20773c5

Please sign in to comment.