From 4ec735686514e1fb91b9ea51ef893d49b28e4877 Mon Sep 17 00:00:00 2001 From: Eric Blevins Date: Thu, 9 May 2024 19:04:28 -0400 Subject: [PATCH 1/2] Created example dimmer control --- .../config/buttons/dimmer-down-invisible.yaml | 10 ++++++ .../config/buttons/dimmer-up-invisible.yaml | 10 ++++++ .../includes/vertical_dimmer_control.yaml | 31 +++++++++++++++++++ pyefis/config/includes/virtual_vfr.yaml | 6 ++++ 4 files changed, 57 insertions(+) create mode 100644 pyefis/config/buttons/dimmer-down-invisible.yaml create mode 100644 pyefis/config/buttons/dimmer-up-invisible.yaml create mode 100644 pyefis/config/includes/vertical_dimmer_control.yaml diff --git a/pyefis/config/buttons/dimmer-down-invisible.yaml b/pyefis/config/buttons/dimmer-down-invisible.yaml new file mode 100644 index 00000000..6712c7cf --- /dev/null +++ b/pyefis/config/buttons/dimmer-down-invisible.yaml @@ -0,0 +1,10 @@ +type: repeat +text: "" +dbkey: BTNDIMDN +transparent: true +repeat_interval: 50 +repeat_delay: 100 +conditions: + - when: "CLICKED eq true" + actions: + - change value: DIM,-1 diff --git a/pyefis/config/buttons/dimmer-up-invisible.yaml b/pyefis/config/buttons/dimmer-up-invisible.yaml new file mode 100644 index 00000000..468a3f47 --- /dev/null +++ b/pyefis/config/buttons/dimmer-up-invisible.yaml @@ -0,0 +1,10 @@ +type: repeat +text: "" +dbkey: BTNDIMUP +transparent: true +repeat_interval: 50 +repeat_delay: 100 +conditions: + - when: "CLICKED eq true" + actions: + - change value: DIM,1 diff --git a/pyefis/config/includes/vertical_dimmer_control.yaml b/pyefis/config/includes/vertical_dimmer_control.yaml new file mode 100644 index 00000000..ba038a5f --- /dev/null +++ b/pyefis/config/includes/vertical_dimmer_control.yaml @@ -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 + diff --git a/pyefis/config/includes/virtual_vfr.yaml b/pyefis/config/includes/virtual_vfr.yaml index aa6016be..a79f4f27 100644 --- a/pyefis/config/includes/virtual_vfr.yaml +++ b/pyefis/config/includes/virtual_vfr.yaml @@ -57,6 +57,12 @@ instruments: columns: 15 options: font_percent: 0.25 + - type: include,includes/vertical_dimmer_control.yaml + row: 90 + column: 16 + span: + rows: 20 + columns: 6 - type: heading_display row: 0 column: 72.5 From 3e5891d235af60f2b7f7b395ed3459840b3c03ae Mon Sep 17 00:00:00 2001 From: Eric Blevins Date: Mon, 27 May 2024 20:37:15 -0400 Subject: [PATCH 2/2] Added preference option fo dimmer control and changed buttons fixids --- pyefis/config/buttons/dimmer-down-invisible.yaml | 2 +- pyefis/config/buttons/dimmer-up-invisible.yaml | 2 +- pyefis/config/includes/ahrs/virtual_vfr.yaml | 5 +++-- .../vertical/dimmer_control.yaml} | 0 pyefis/config/preferences.yaml | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) rename pyefis/config/includes/{vertical_dimmer_control.yaml => bars/vertical/dimmer_control.yaml} (100%) diff --git a/pyefis/config/buttons/dimmer-down-invisible.yaml b/pyefis/config/buttons/dimmer-down-invisible.yaml index 6712c7cf..fad37eaa 100644 --- a/pyefis/config/buttons/dimmer-down-invisible.yaml +++ b/pyefis/config/buttons/dimmer-down-invisible.yaml @@ -1,6 +1,6 @@ type: repeat text: "" -dbkey: BTNDIMDN +dbkey: TSBTN{id}28 transparent: true repeat_interval: 50 repeat_delay: 100 diff --git a/pyefis/config/buttons/dimmer-up-invisible.yaml b/pyefis/config/buttons/dimmer-up-invisible.yaml index 468a3f47..d0123727 100644 --- a/pyefis/config/buttons/dimmer-up-invisible.yaml +++ b/pyefis/config/buttons/dimmer-up-invisible.yaml @@ -1,6 +1,6 @@ type: repeat text: "" -dbkey: BTNDIMUP +dbkey: TSBTN{id}27 transparent: true repeat_interval: 50 repeat_delay: 100 diff --git a/pyefis/config/includes/ahrs/virtual_vfr.yaml b/pyefis/config/includes/ahrs/virtual_vfr.yaml index 02068d7f..6e4adfea 100644 --- a/pyefis/config/includes/ahrs/virtual_vfr.yaml +++ b/pyefis/config/includes/ahrs/virtual_vfr.yaml @@ -84,9 +84,10 @@ instruments: columns: 15 options: font_percent: 0.25 - - type: include,includes/vertical_dimmer_control.yaml + - type: include,includes/bars/vertical/dimmer_control.yaml + disabled: DIMMER row: 90 - column: 16 + column: 112 span: rows: 20 columns: 6 diff --git a/pyefis/config/includes/vertical_dimmer_control.yaml b/pyefis/config/includes/bars/vertical/dimmer_control.yaml similarity index 100% rename from pyefis/config/includes/vertical_dimmer_control.yaml rename to pyefis/config/includes/bars/vertical/dimmer_control.yaml diff --git a/pyefis/config/preferences.yaml b/pyefis/config/preferences.yaml index 144191f5..a9ea73fa 100644 --- a/pyefis/config/preferences.yaml +++ b/pyefis/config/preferences.yaml @@ -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