mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 14:43:51 +00:00
[CI] Consolidate some tests (U, V, W, X, Y, Z) (#8210)
This commit is contained in:
35
tests/components/xpt2046/common.yaml
Normal file
35
tests/components/xpt2046/common.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
spi:
|
||||
- id: spi_xpt2046
|
||||
clk_pin: ${clk_pin}
|
||||
mosi_pin: ${mosi_pin}
|
||||
miso_pin: ${miso_pin}
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: xpt_display
|
||||
dimensions: 320x240
|
||||
model: TFT 2.4
|
||||
cs_pin: ${disp_cs_pin}
|
||||
dc_pin: ${dc_pin}
|
||||
reset_pin: ${reset_pin}
|
||||
invert_colors: false
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: xpt2046
|
||||
id: xpt_touchscreen
|
||||
cs_pin: ${cs_pin}
|
||||
interrupt_pin: ${interrupt_pin}
|
||||
display: xpt_display
|
||||
update_interval: 50ms
|
||||
threshold: 400
|
||||
calibration:
|
||||
x_min: 280
|
||||
x_max: 3860
|
||||
y_min: 340
|
||||
y_max: 3860
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
@@ -1,35 +1,11 @@
|
||||
spi:
|
||||
- id: spi_xpt2046
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
substitutions:
|
||||
clk_pin: GPIO17
|
||||
mosi_pin: GPIO18
|
||||
miso_pin: GPIO19
|
||||
dc_pin: GPIO13
|
||||
cs_pin: GPIO14
|
||||
disp_cs_pin: GPIO4
|
||||
interrupt_pin: GPIO21
|
||||
reset_pin: GPIO22
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: xpt_display
|
||||
dimensions: 320x240
|
||||
model: TFT 2.4
|
||||
cs_pin: 13
|
||||
dc_pin: 14
|
||||
reset_pin: 21
|
||||
invert_colors: false
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: xpt2046
|
||||
id: xpt_touchscreen
|
||||
cs_pin: 18
|
||||
interrupt_pin: 19
|
||||
display: xpt_display
|
||||
update_interval: 50ms
|
||||
threshold: 400
|
||||
calibration:
|
||||
x_min: 280
|
||||
x_max: 3860
|
||||
y_min: 340
|
||||
y_max: 3860
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,35 +1,11 @@
|
||||
spi:
|
||||
- id: spi_xpt2046
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
substitutions:
|
||||
clk_pin: GPIO4
|
||||
mosi_pin: GPIO5
|
||||
miso_pin: GPIO6
|
||||
dc_pin: GPIO7
|
||||
cs_pin: GPIO0
|
||||
disp_cs_pin: GPIO1
|
||||
interrupt_pin: GPIO3
|
||||
reset_pin: GPIO10
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: xpt_display
|
||||
dimensions: 320x240
|
||||
model: TFT 2.4
|
||||
cs_pin: 8
|
||||
dc_pin: 9
|
||||
reset_pin: 10
|
||||
invert_colors: false
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: xpt2046
|
||||
id: xpt_touchscreen
|
||||
cs_pin: 4
|
||||
interrupt_pin: 3
|
||||
display: xpt_display
|
||||
update_interval: 50ms
|
||||
threshold: 400
|
||||
calibration:
|
||||
x_min: 28
|
||||
x_max: 280
|
||||
y_min: 340
|
||||
y_max: 3860
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,35 +1,11 @@
|
||||
spi:
|
||||
- id: spi_xpt2046
|
||||
clk_pin: 6
|
||||
mosi_pin: 7
|
||||
miso_pin: 5
|
||||
substitutions:
|
||||
clk_pin: GPIO4
|
||||
mosi_pin: GPIO5
|
||||
miso_pin: GPIO6
|
||||
dc_pin: GPIO7
|
||||
cs_pin: GPIO0
|
||||
disp_cs_pin: GPIO1
|
||||
interrupt_pin: GPIO3
|
||||
reset_pin: GPIO10
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: xpt_display
|
||||
dimensions: 320x240
|
||||
model: TFT 2.4
|
||||
cs_pin: 8
|
||||
dc_pin: 9
|
||||
reset_pin: 10
|
||||
invert_colors: false
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: xpt2046
|
||||
id: xpt_touchscreen
|
||||
cs_pin: 4
|
||||
interrupt_pin: 3
|
||||
display: xpt_display
|
||||
update_interval: 50ms
|
||||
threshold: 400
|
||||
calibration:
|
||||
x_min: 50
|
||||
x_max: 280
|
||||
y_min: 340
|
||||
y_max: 3860
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,35 +1,11 @@
|
||||
spi:
|
||||
- id: spi_xpt2046
|
||||
clk_pin: 16
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
substitutions:
|
||||
clk_pin: GPIO17
|
||||
mosi_pin: GPIO18
|
||||
miso_pin: GPIO19
|
||||
dc_pin: GPIO13
|
||||
cs_pin: GPIO14
|
||||
disp_cs_pin: GPIO4
|
||||
interrupt_pin: GPIO21
|
||||
reset_pin: GPIO22
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: xpt_display
|
||||
dimensions: 320x240
|
||||
model: TFT 2.4
|
||||
cs_pin: 13
|
||||
dc_pin: 14
|
||||
reset_pin: 21
|
||||
invert_colors: false
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: xpt2046
|
||||
id: xpt_touchscreen
|
||||
cs_pin: 18
|
||||
interrupt_pin: 19
|
||||
display: xpt_display
|
||||
update_interval: 50ms
|
||||
threshold: 400
|
||||
calibration:
|
||||
x_min: 50
|
||||
x_max: 280
|
||||
y_min: 340
|
||||
y_max: 3860
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
spi:
|
||||
clk_pin: 7
|
||||
mosi_pin: 11
|
||||
miso_pin: 9
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: my_display
|
||||
model: ili9341
|
||||
cs_pin: 5
|
||||
dc_pin: 12
|
||||
reset_pin: 33
|
||||
auto_clear_enabled: false
|
||||
data_rate: 40MHz
|
||||
dimensions: 320x240
|
||||
update_interval: never
|
||||
invert_colors: false
|
||||
transform:
|
||||
mirror_y: false
|
||||
mirror_x: false
|
||||
swap_xy: true
|
||||
|
||||
touchscreen:
|
||||
- platform: xpt2046
|
||||
display: my_display
|
||||
id: my_toucher
|
||||
update_interval: 50ms
|
||||
cs_pin: 18
|
||||
threshold: 300
|
||||
calibration:
|
||||
x_min: 210
|
||||
x_max: 3890
|
||||
y_min: 170
|
||||
y_max: 3730
|
||||
transform:
|
||||
mirror_x: false
|
||||
mirror_y: true
|
||||
swap_xy: true
|
||||
@@ -1,35 +1,11 @@
|
||||
spi:
|
||||
- id: spi_xpt2046
|
||||
clk_pin: 14
|
||||
mosi_pin: 13
|
||||
miso_pin: 12
|
||||
substitutions:
|
||||
clk_pin: GPIO14
|
||||
mosi_pin: GPIO13
|
||||
miso_pin: GPIO12
|
||||
dc_pin: GPIO15
|
||||
cs_pin: GPIO16
|
||||
disp_cs_pin: GPIO4
|
||||
interrupt_pin: GPIO5
|
||||
reset_pin: GPIO2
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: xpt_display
|
||||
dimensions: 320x240
|
||||
model: TFT 2.4
|
||||
cs_pin: 15
|
||||
dc_pin: 4
|
||||
reset_pin: 5
|
||||
invert_colors: false
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: xpt2046
|
||||
id: xpt_touchscreen
|
||||
cs_pin: 0
|
||||
interrupt_pin: 16
|
||||
display: xpt_display
|
||||
update_interval: 50ms
|
||||
threshold: 400
|
||||
calibration:
|
||||
x_min: 50
|
||||
x_max: 280
|
||||
y_min: 340
|
||||
y_max: 3860
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -1,35 +1,11 @@
|
||||
spi:
|
||||
- id: spi_xpt2046
|
||||
clk_pin: 2
|
||||
mosi_pin: 3
|
||||
miso_pin: 4
|
||||
substitutions:
|
||||
clk_pin: GPIO6
|
||||
mosi_pin: GPIO7
|
||||
miso_pin: GPIO8
|
||||
dc_pin: GPIO9
|
||||
cs_pin: GPIO0
|
||||
disp_cs_pin: GPIO1
|
||||
interrupt_pin: GPIO2
|
||||
reset_pin: GPIO3
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: xpt_display
|
||||
dimensions: 320x240
|
||||
model: TFT 2.4
|
||||
cs_pin: 8
|
||||
dc_pin: 9
|
||||
reset_pin: 10
|
||||
invert_colors: false
|
||||
lambda: |-
|
||||
it.rectangle(0, 0, it.get_width(), it.get_height());
|
||||
|
||||
touchscreen:
|
||||
- platform: xpt2046
|
||||
id: xpt_touchscreen
|
||||
cs_pin: 5
|
||||
interrupt_pin: 6
|
||||
display: xpt_display
|
||||
update_interval: 50ms
|
||||
threshold: 400
|
||||
calibration:
|
||||
x_min: 280
|
||||
x_max: 3860
|
||||
y_min: 340
|
||||
y_max: 3860
|
||||
on_touch:
|
||||
- logger.log:
|
||||
format: Touch at (%d, %d)
|
||||
args: [touch.x, touch.y]
|
||||
<<: !include common.yaml
|
||||
|
||||
Reference in New Issue
Block a user