Skip to content

Commit

Permalink
Merge pull request #189 from e100/dimmer_control
Browse files Browse the repository at this point in the history
Created example dimmer control for #103
  • Loading branch information
e100 authored May 28, 2024
2 parents 058e307 + 3e5891d commit 4fe8c11
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1 deletion.
10 changes: 10 additions & 0 deletions pyefis/config/buttons/dimmer-down-invisible.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: repeat
text: ""
dbkey: TSBTN{id}28
transparent: true
repeat_interval: 50
repeat_delay: 100
conditions:
- when: "CLICKED eq true"
actions:
- change value: DIM,-1
10 changes: 10 additions & 0 deletions pyefis/config/buttons/dimmer-up-invisible.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: repeat
text: ""
dbkey: TSBTN{id}27
transparent: true
repeat_interval: 50
repeat_delay: 100
conditions:
- when: "CLICKED eq true"
actions:
- change value: DIM,1
7 changes: 7 additions & 0 deletions pyefis/config/includes/ahrs/virtual_vfr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ instruments:
columns: 15
options:
font_percent: 0.25
- type: include,includes/bars/vertical/dimmer_control.yaml
disabled: DIMMER
row: 90
column: 112
span:
rows: 20
columns: 6
- type: heading_display
disabled: HEADING
row: 0
Expand Down
31 changes: 31 additions & 0 deletions pyefis/config/includes/bars/vertical/dimmer_control.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
instruments:
- type: vertical_bar_gauge
row: 0
column: 0
span:
rows: 20
columns: 6
options:
name: Dimmer
decimal_places: 0
show_units: false
show_value: false
dbkey: DIM
bar_width_percent: 0.5
- type: button
row: 0
column: 0
span:
rows: 10
columns: 6
options:
config: buttons/dimmer-up-invisible.yaml
- type: button
row: 10
column: 0
span:
rows: 10
columns: 6
options:
config: buttons/dimmer-down-invisible.yaml

2 changes: 1 addition & 1 deletion pyefis/config/preferences.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ enabled:
CYLINDER_2: true
CYLINDER_3: true
CYLINDER_4: true

DIMMER: false

# Here you can define what include files are used to render some
# portion of the screen so you can customize as needed easily
Expand Down

0 comments on commit 4fe8c11

Please sign in to comment.