diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | testenv/v2-hdmi-rpi4.override.yaml | 81 |
2 files changed, 29 insertions, 54 deletions
@@ -3,6 +3,7 @@ TESTENV_IMAGE ?= kvmd-testenv TESTENV_HID ?= /dev/ttyS10 TESTENV_VIDEO ?= /dev/video0 +TESTENV_RELAY ?= $(if $(shell ls /dev/hidraw0 2>/dev/null || true),/dev/hidraw0,) USTREAMER_MIN_VERSION ?= $(shell grep -o 'ustreamer>=[^"]\+' PKGBUILD | sed 's/ustreamer>=//g') @@ -75,6 +76,7 @@ run: testenv --volume `pwd`/configs:/usr/share/kvmd/configs.default:ro \ --volume `pwd`/contrib/keymaps:/usr/share/kvmd/keymaps:ro \ --device $(TESTENV_VIDEO):$(TESTENV_VIDEO) \ + $(if $(TESTENV_RELAY),--device $(TESTENV_RELAY):$(TESTENV_RELAY),) \ --publish 8080:80/tcp \ -it $(TESTENV_IMAGE) /bin/bash -c " \ (socat PTY,link=$(TESTENV_HID) PTY,link=/dev/ttyS11 &) \ diff --git a/testenv/v2-hdmi-rpi4.override.yaml b/testenv/v2-hdmi-rpi4.override.yaml index a4e5a397..f6450355 100644 --- a/testenv/v2-hdmi-rpi4.override.yaml +++ b/testenv/v2-hdmi-rpi4.override.yaml @@ -39,79 +39,52 @@ kvmd: gpio: drivers: - gpio2: - type: gpio - state_poll: 0.3 + relay: + type: hidrelay + device: /dev/hidraw0 scheme: - host1: # any name like foo_bar_baz - pin: 1 - mode: input - host2: - pin: 2 - mode: input - host3: - pin: 3 + led1: + pin: 0 mode: input - host4: - pin: 4 - mode: input - change_host: - pin: 5 - mode: output - switch: false - host1_pwr: - pin: 11 - mode: input - host2_pwr: - pin: 12 - mode: input - host3_pwr: - pin: 13 - mode: input - host4_pwr: - pin: 14 + led2: + pin: 1 mode: input - host1_pwr_btn: - pin: 21 + button1: + pin: 10 mode: output switch: false - host2_pwr_btn: - pin: 22 - mode: output - switch: false - host3_pwr_btn: - pin: 23 + + button2: + pin: 11 mode: output switch: false - host4_pwr_btn: - pin: 24 + + relay1: + pin: 0 mode: output - switch: false + initial: null + driver: relay - lamp: - pin: 50 + relay2: + pin: 1 mode: output - pulse: - delay: 0 + initial: null + driver: relay view: - header: - title: Switch table: - - ["#Multihost controller"] + - ["#Generic GPIO leds"] - [] - - ["", "#Current", "#Power"] - - ["#host1.localdomain:", host1, host1_pwr, "host1_pwr_btn,Pwr"] - - ["#host2.localdomain:", host2, host2_pwr, "host2_pwr_btn,Pwr"] - - ["#host3.localdomain:", host3, host3_pwr, "host3_pwr_btn,Pwr"] - - ["#host4.localdomain:", host4, host4_pwr, "host4_pwr_btn,Pwr"] + - ["#Test 1:", led1, button1] + - ["#Test 2:", led2, button2] - [] - - ["change_host,Change host"] + - ["#HID Relays /dev/hidraw0"] - [] - - ["#Lamp in the rack", lamp] + - ["#Relay #1:", relay1] + - ["#Relay #2:", relay2] vnc: keymap: /usr/share/kvmd/keymaps/ru |