mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
[mapping] Use custom allocator (#9972)
This commit is contained in:
1
tests/components/mapping/.gitattributes
vendored
Normal file
1
tests/components/mapping/.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.ttf -text
|
||||
@@ -50,6 +50,14 @@ mapping:
|
||||
red: red_id
|
||||
blue: blue_id
|
||||
green: green_id
|
||||
- id: string_map_2
|
||||
from: string
|
||||
to: string
|
||||
entries:
|
||||
one: "one"
|
||||
two: "two"
|
||||
three: "three"
|
||||
seventy-seven: "seventy-seven"
|
||||
|
||||
color:
|
||||
- id: red_id
|
||||
@@ -65,7 +73,14 @@ color:
|
||||
green: 0.0
|
||||
blue: 1.0
|
||||
|
||||
font:
|
||||
- file: "$component_dir/helvetica.ttf"
|
||||
id: font_id
|
||||
size: 20
|
||||
|
||||
display:
|
||||
lambda: |-
|
||||
it.image(0, 0, id(weather_map)[0]);
|
||||
it.image(0, 100, id(weather_map)[1]);
|
||||
std::string value = id(int_map)[2];
|
||||
it.print(0, 0, id(font_id), TextAlign::TOP_LEFT, value.c_str());
|
||||
it.image(0, 0, id(weather_map)["clear-night"]);
|
||||
it.image(0, 100, id(weather_map)["sunny"]);
|
||||
|
||||
BIN
tests/components/mapping/helvetica.ttf
Normal file
BIN
tests/components/mapping/helvetica.ttf
Normal file
Binary file not shown.
@@ -4,14 +4,14 @@ spi:
|
||||
mosi_pin: 17
|
||||
miso_pin: 15
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 12
|
||||
dc_pin: 13
|
||||
reset_pin: 21
|
||||
invert_colors: false
|
||||
|
||||
packages:
|
||||
map: !include common.yaml
|
||||
|
||||
display:
|
||||
platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 12
|
||||
dc_pin: 13
|
||||
reset_pin: 21
|
||||
invert_colors: false
|
||||
|
||||
@@ -5,13 +5,13 @@ spi:
|
||||
miso_pin: 5
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 8
|
||||
dc_pin: 9
|
||||
reset_pin: 10
|
||||
invert_colors: false
|
||||
platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 8
|
||||
dc_pin: 9
|
||||
reset_pin: 10
|
||||
invert_colors: false
|
||||
|
||||
packages:
|
||||
map: !include common.yaml
|
||||
|
||||
@@ -5,13 +5,13 @@ spi:
|
||||
miso_pin: 5
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 8
|
||||
dc_pin: 9
|
||||
reset_pin: 10
|
||||
invert_colors: false
|
||||
platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 8
|
||||
dc_pin: 9
|
||||
reset_pin: 10
|
||||
invert_colors: false
|
||||
|
||||
packages:
|
||||
map: !include common.yaml
|
||||
|
||||
@@ -5,13 +5,13 @@ spi:
|
||||
miso_pin: 15
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 12
|
||||
dc_pin: 13
|
||||
reset_pin: 21
|
||||
invert_colors: false
|
||||
platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 12
|
||||
dc_pin: 13
|
||||
reset_pin: 21
|
||||
invert_colors: false
|
||||
|
||||
packages:
|
||||
map: !include common.yaml
|
||||
|
||||
@@ -5,13 +5,13 @@ spi:
|
||||
miso_pin: 12
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 5
|
||||
dc_pin: 15
|
||||
reset_pin: 16
|
||||
invert_colors: false
|
||||
platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 5
|
||||
dc_pin: 15
|
||||
reset_pin: 16
|
||||
invert_colors: false
|
||||
|
||||
packages:
|
||||
map: !include common.yaml
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
display:
|
||||
- platform: sdl
|
||||
id: sdl_display
|
||||
update_interval: 1s
|
||||
auto_clear_enabled: false
|
||||
show_test_card: true
|
||||
dimensions:
|
||||
width: 450
|
||||
height: 600
|
||||
platform: sdl
|
||||
id: sdl_display
|
||||
update_interval: 1s
|
||||
auto_clear_enabled: false
|
||||
show_test_card: true
|
||||
dimensions:
|
||||
width: 450
|
||||
height: 600
|
||||
|
||||
packages:
|
||||
map: !include common.yaml
|
||||
|
||||
@@ -5,13 +5,13 @@ spi:
|
||||
miso_pin: 4
|
||||
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 20
|
||||
dc_pin: 21
|
||||
reset_pin: 22
|
||||
invert_colors: false
|
||||
platform: ili9xxx
|
||||
id: main_lcd
|
||||
model: ili9342
|
||||
cs_pin: 20
|
||||
dc_pin: 21
|
||||
reset_pin: 22
|
||||
invert_colors: false
|
||||
|
||||
packages:
|
||||
map: !include common.yaml
|
||||
|
||||
Reference in New Issue
Block a user