Skip to content

Commit

Permalink
Adding a lexicon
Browse files Browse the repository at this point in the history
  • Loading branch information
devleaks committed Oct 18, 2024
1 parent 1ad5567 commit 0c9a1b0
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
docs/images/.DS_Store
docs/images/.DS_Store
docs/images/.DS_Store
docs/images/.DS_Store
2 changes: 1 addition & 1 deletion docs/Cockpit.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Resources are fonts, icons, other images, wallpapers, documentation, and texts u
| Folder | Content |
| ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| icons | Folder containing all icon images for that aircraft. Images should be in JPEG or PNG format. Typical icon size is 256 × 256 pixels, RGB(A). Icons are named after their file name without the extension. |
| fonts | Folder containing all icon images for that aircraft. Images should be in JPEG or PNG format. Typical icon size is 256 × 256 pixels, RGB(A). Icons are named after their file name without the extension. |
| fonts | Folder containing all fonts for that aircraft. Fonts can be Truetype or Opentype. Fonts are named after their file name with the extension. |
| docs | Docs folder may contain documentation files, like explanatory images, and descriptive texts. Simpler text or markdown files are preferred. |
| decks | Cockpitdecks allow experienced users to add their own [[Web Decks]] specific to an aircraft. |

Expand Down
59 changes: 59 additions & 0 deletions docs/Extending/Internals/Observables.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Observables are data that is constantly monitored. When the data matches some criteria, a list of actions or commands is executed.

For people familiar with the concept, it can be considered a *if-this-then-that* instruction. For example: If the weather data from the simulator indicates rain is falling on the aircraft, we can set the windshield wipers automatically.

Observables are defined at the aircraft level.

# Definition

The file `observables.yaml` is located in the `deckconfig/resources` folder of an aircraft. It is loaded on startup.

```
observables:
- name: example
trigger: onchange
dataref: some/dataref/to/check
actions:
- command: do/some/action
delay: 5
```

## Attribute

### Observables

The `observables` attribute is a list of individual observables.

# Observable

## Attributes

### Trigger

#### True/False Evaluation

The `trigger` attribute of an observable is a single dataref or a formula that is evaluated each time a dataref mentioned in the formula changes. The result of a the formula is compared to 0, i.e. True (different from zero) or False (equal to zero).

If the result of the formula is True, commands listed into the `actions` attributes are executed.

#### Value Changed

Another method to trigger the flow of action(s) is to select the *value changed* mode. Actions get executed as the value of the dataref or of the computation has changed.

### Observable

The observable is the data that is monitored. It can either be a single dataref or a formula.

### Actions

The `actions` attribute is a list of individual actions that gets carried out in sequence if the trigger attribute is True.

# Action

## Attributes

An action as the same attribute as a command carried out by a button:

- instruction
- delay
- condition
40 changes: 40 additions & 0 deletions docs/Extending/Reference/Lexicon.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Button

A button is a piece of a deck a user can use to provide some interaction.

It can be a simple button to press, a small LCD button, an encoder to turn, or a touch screen that can be swiped with multiple fingers.

# Deck

A Deck is a piece of hardware connected to a computer to provide some input by means of buttons, encoders, cursors... A Deck also provide some feedback to the user through colored LED lights, small LCD icon screens, or by emitting sound and vibration.

# Layout

In Cockpitdecks, a Layout is a collection of pages that can be displayed on a deck. ON startup, a deck must tell Cockpitdecks which Layout it is going to use.

# Cockpitdecks

Cockpitdecks is the name of the application used to control decks connected to a computer.

# Activation

# Representation

# Simulator

# Simulator Data
# Simulator Instruction

# Event

## Simulator Event

## Deck Event

# Dataref

A Dataref is a simulator data inside the X-Plane flight simulator.

# SimVar

A SimVar is a simulator data from Flight Simulator. There are several types of SimVar. Please refer to the [Flight Simulator SDK](https://docs.flightsimulator.com/html/Introduction/SDK_Overview.htm) for more information.
Binary file modified docs/images/.DS_Store
Binary file not shown.

0 comments on commit 0c9a1b0

Please sign in to comment.