On the ILI9xxx display's enable the psram on esp32 and allow big screen (#4551)

* enable the psram on esp32 and allow big screen

* update CODEOWNERS

* small update

* update CODEOWNERS again.

* Removed the M5STACK because it is a ESP32 device.

* i removed the wrong model

* update the error message.
This commit is contained in:
NP v/d Spek 2023-03-13 01:13:19 +01:00 committed by GitHub
parent ea17a92dbc
commit 6a6aee510d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,13 @@ from esphome.const import (
)
DEPENDENCIES = ["spi"]
AUTO_LOAD = ["psram"]
def AUTO_LOAD():
if CORE.is_esp32:
return ["psram"]
return []
CODEOWNERS = ["@nielsnl68"]
@ -60,6 +66,16 @@ def _validate(config):
raise cv.Invalid(
"Providing color palette images requires palette mode to be 'IMAGE_ADAPTIVE'"
)
if CORE.is_esp8266 and config.get(CONF_MODEL) not in [
"M5STACK",
"TFT_2.4",
"TFT_2.4R",
"ILI9341",
"ILI9342",
]:
raise cv.Invalid(
"Provided model can't run on ESP8266. Use an ESP32 with PSRAM onboard"
)
return config