mirror of
https://github.com/esphome/esphome.git
synced 2025-10-01 01:22:20 +01:00
Merge branch 'scheduler_pool_v2' into integration
This commit is contained in:
@@ -80,7 +80,7 @@ CONFIG_SCHEMA = cv.All(
|
||||
cv.Schema(
|
||||
{
|
||||
cv.GenerateID(): cv.declare_id(BluetoothProxy),
|
||||
cv.Optional(CONF_ACTIVE, default=False): cv.boolean,
|
||||
cv.Optional(CONF_ACTIVE, default=True): cv.boolean,
|
||||
cv.SplitDefault(CONF_CACHE_SERVICES, esp32_idf=True): cv.All(
|
||||
cv.only_with_esp_idf, cv.boolean
|
||||
),
|
||||
|
@@ -40,6 +40,7 @@ from esphome.cpp_generator import RawExpression
|
||||
import esphome.final_validate as fv
|
||||
from esphome.helpers import copy_file_if_changed, mkdir_p, write_file_if_changed
|
||||
from esphome.types import ConfigType
|
||||
from esphome.writer import clean_cmake_cache
|
||||
|
||||
from .boards import BOARDS, STANDARD_BOARDS
|
||||
from .const import ( # noqa
|
||||
@@ -840,6 +841,9 @@ async def to_code(config):
|
||||
if conf[CONF_ADVANCED][CONF_IGNORE_EFUSE_CUSTOM_MAC]:
|
||||
cg.add_define("USE_ESP32_IGNORE_EFUSE_CUSTOM_MAC")
|
||||
|
||||
for clean_var in ("IDF_PATH", "IDF_TOOLS_PATH"):
|
||||
os.environ.pop(clean_var, None)
|
||||
|
||||
add_extra_script(
|
||||
"post",
|
||||
"post_build.py",
|
||||
@@ -1074,7 +1078,11 @@ def _write_idf_component_yml():
|
||||
contents = yaml_util.dump({"dependencies": dependencies})
|
||||
else:
|
||||
contents = ""
|
||||
write_file_if_changed(yml_path, contents)
|
||||
if write_file_if_changed(yml_path, contents):
|
||||
dependencies_lock = CORE.relative_build_path("dependencies.lock")
|
||||
if os.path.isfile(dependencies_lock):
|
||||
os.remove(dependencies_lock)
|
||||
clean_cmake_cache()
|
||||
|
||||
|
||||
# Called by writer.py
|
||||
|
@@ -47,9 +47,9 @@ ErrorCode I2CDevice::write_register(uint8_t a_register, const uint8_t *data, siz
|
||||
|
||||
ErrorCode I2CDevice::write_register16(uint16_t a_register, const uint8_t *data, size_t len) const {
|
||||
std::vector<uint8_t> v(len + 2);
|
||||
v.push_back(a_register >> 8);
|
||||
v.push_back(a_register);
|
||||
v.insert(v.end(), data, data + len);
|
||||
v[0] = a_register >> 8;
|
||||
v[1] = a_register;
|
||||
std::copy(data, data + len, v.begin() + 2);
|
||||
return bus_->write_readv(this->address_, v.data(), v.size(), nullptr, 0);
|
||||
}
|
||||
|
||||
|
@@ -51,7 +51,7 @@ from . import wpa2_eap
|
||||
|
||||
AUTO_LOAD = ["network"]
|
||||
|
||||
NO_WIFI_VARIANTS = [const.VARIANT_ESP32H2]
|
||||
NO_WIFI_VARIANTS = [const.VARIANT_ESP32H2, const.VARIANT_ESP32P4]
|
||||
CONF_SAVE = "save"
|
||||
|
||||
wifi_ns = cg.esphome_ns.namespace("wifi")
|
||||
@@ -179,8 +179,8 @@ WIFI_NETWORK_STA = WIFI_NETWORK_BASE.extend(
|
||||
def validate_variant(_):
|
||||
if CORE.is_esp32:
|
||||
variant = get_esp32_variant()
|
||||
if variant in NO_WIFI_VARIANTS:
|
||||
raise cv.Invalid(f"{variant} does not support WiFi")
|
||||
if variant in NO_WIFI_VARIANTS and "esp32_hosted" not in fv.full_config.get():
|
||||
raise cv.Invalid(f"WiFi requires component esp32_hosted on {variant}")
|
||||
|
||||
|
||||
def final_validate(config):
|
||||
|
@@ -310,6 +310,10 @@ def clean_build():
|
||||
if os.path.isdir(piolibdeps):
|
||||
_LOGGER.info("Deleting %s", piolibdeps)
|
||||
shutil.rmtree(piolibdeps)
|
||||
dependencies_lock = CORE.relative_build_path("dependencies.lock")
|
||||
if os.path.isfile(dependencies_lock):
|
||||
_LOGGER.info("Deleting %s", dependencies_lock)
|
||||
os.remove(dependencies_lock)
|
||||
|
||||
|
||||
GITIGNORE_CONTENT = """# Gitignore settings for ESPHome
|
||||
|
@@ -1059,7 +1059,9 @@ def _generate_array_dump_content(
|
||||
# Check if underlying type can use dump_field
|
||||
if ti.can_use_dump_field():
|
||||
# For types that have dump_field overloads, use them with extra indent
|
||||
o += f' dump_field(out, "{name}", {ti.dump_field_value("it")}, 4);\n'
|
||||
# std::vector<bool> iterators return proxy objects, need explicit cast
|
||||
value_expr = "static_cast<bool>(it)" if is_bool else ti.dump_field_value("it")
|
||||
o += f' dump_field(out, "{name}", {value_expr}, 4);\n'
|
||||
else:
|
||||
# For complex types (messages, bytes), use the old pattern
|
||||
o += f' out.append(" {name}: ");\n'
|
||||
|
@@ -4,7 +4,7 @@ esphome:
|
||||
host:
|
||||
|
||||
logger:
|
||||
level: DEBUG
|
||||
level: VERY_VERBOSE
|
||||
|
||||
api:
|
||||
actions:
|
||||
|
Reference in New Issue
Block a user