Skip to content

Commit

Permalink
corrected name changes
Browse files Browse the repository at this point in the history
  • Loading branch information
devleaks committed Jul 2, 2024
1 parent af79786 commit fb11fc0
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/Button.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ In that list, each button is defined by a list of attributes that will determine

The *Button Definition* is a list of parameters that describe what the button will do when it is manipulated and how it will be represented on the deck if the deck can some how represent the state of that button. Here is an example of button definition:

```yaml hl_lines="3 5"
```yaml hl_lines="4 6"
buttons:
- index: 2
name: MASTER WARNING
Expand Down
14 changes: 14 additions & 0 deletions docs/Button/Button Activation.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,20 @@ Optional dataref to set the value of the current stop.

Very much like On/Off activation either `commands` or `set-dataref` can be supplied or both.

# ShortOrLongpress

Short or long press has two commands, one that is executed when the button is pressed for less than `long-time` seconds, and one when it is pressed more than `long-time` seconds.

`type`: short-or-longpress

`commands`

Two commands, the first one is called on short press.

`long-time`

Time to press the button to activate second command. Default to 2 seconds.

# Encoder

`Type: encoder`
Expand Down
9 changes: 9 additions & 0 deletions docs/Button/Button Representations/Deck Specific.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# ColoredLed

ColoredLed buttons are color capable led behind a transparent or mask button.
They are either on or off, with a RGB color.

```
colored-led: blue
```

# EncoderLEDs

`led: encoder-leds`
Expand Down
8 changes: 4 additions & 4 deletions docs/Extending/Adding New Deck Models.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,22 @@ driver: streamdeck
buttons:
- name: 0
action: push
view: image
feedback: image
image: [96, 96, 0, 0]
repeat: 8
- name: 0
prefix: e
action: encoder-push
view: none
feedback: none
repeat: 4
# touchscreen in streamdeck package vocabulary
- name: touchscreen
action: swipe
view: image
feedback: image
image: [800, 100, 0, 0]
```
Through this file, Cockpitdecks is capable to determine that there are 8 (repeat) LCD buttons, named `0`.. `7`, capable of being pushed (action), and capable of displaying a 96x96 pixel image (view, image). Similarly, there are 4 encoders and a swipe screen.
Through this file, Cockpitdecks is capable to determine that there are 8 (repeat) LCD buttons, named `0`.. `7`, capable of being pushed (action), and capable of displaying a 96x96 pixel image (feedback, image). Similarly, there are 4 encoders and a swipe screen.

### Type

Expand Down
2 changes: 2 additions & 0 deletions docs/Extending/Adding Representations.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class SpecialtyIcon(Representation):
def __init__(self, config: dict, button: "Button"):
Representation.__init__(self, config=config, button=button)

self.param1_value = config.get("param1")

```

In the button definition:
Expand Down
10 changes: 7 additions & 3 deletions docs/Resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Cockpitdecks uses the same convention as [python number to text formatting](http
# Fonts
Font files need to be placed in the `deckconfig/resources/fonts` folder.
Font files available to all decks are in the `deckconfig/resources/fonts` folder.

Font files must be either Truetype fonts (TTF) or Opentype fonts (OTF).

Expand All @@ -34,15 +34,19 @@ Cockpitdeck comes with a few fonts appropriate for aeronautical use: Standard fo

For Truetype font, it is not necessary to add the `.ttf` extension. For Opentype fonts it is necessary to add the `.otf` extension.

> [NOTE] About font files.
> Fonts placed in the resources/fonts folder are available for images on decks. They are not necessarily available as « web fonts » available in web decks.
> To be available directly, not through Cockpitdecks generated images, web decks fonts have to be made available in the asset folder and referenced in proper CSS files.

# Icons

Icon image files need to be placed in the `deckconfig/resources/icons` folder.
Icon image files available to all decks need to be placed in the `deckconfig/resources/icons` folder.

Image files must be either JPEG images (JPG, JPEG) or Portable Network Graphic (PNG).

The name of the file is used to designate the icon.

Icons are loaded on start up, uniformly resized and cached for faster successsive starts.
Icons are loaded on start up and optionally cached.

Typical icon size should be (square) 128 to 256 pixels.

Expand Down

0 comments on commit fb11fc0

Please sign in to comment.