mirror of
https://github.com/esphome/esphome.git
synced 2025-07-24 20:26:35 +00:00
Merge remote-tracking branch 'upstream/dev' into integration
This commit is contained in:
commit
d71f2ad185
@ -15,7 +15,7 @@ class AudioStreamInfo {
|
||||
* - An audio sample represents a unit of audio for one channel.
|
||||
* - A frame represents a unit of audio with a sample for every channel.
|
||||
*
|
||||
* In gneneral, converting between bytes, samples, and frames shouldn't result in rounding errors so long as frames
|
||||
* In general, converting between bytes, samples, and frames shouldn't result in rounding errors so long as frames
|
||||
* are used as the main unit when transferring audio data. Durations may result in rounding for certain sample rates;
|
||||
* e.g., 44.1 KHz. The ``frames_to_milliseconds_with_remainder`` function should be used for accuracy, as it takes
|
||||
* into account the remainder rather than just ignoring any rounding.
|
||||
@ -76,7 +76,7 @@ class AudioStreamInfo {
|
||||
|
||||
/// @brief Computes the duration, in microseconds, the given amount of frames represents.
|
||||
/// @param frames Number of audio frames
|
||||
/// @return Duration in microseconds `frames` respresents. May be slightly inaccurate due to integer divison rounding
|
||||
/// @return Duration in microseconds `frames` represents. May be slightly inaccurate due to integer division rounding
|
||||
/// for certain sample rates.
|
||||
uint32_t frames_to_microseconds(uint32_t frames) const;
|
||||
|
||||
|
@ -5,5 +5,6 @@ CODEOWNERS = ["@esphome/core"]
|
||||
CONF_BYTE_ORDER = "byte_order"
|
||||
CONF_COLOR_DEPTH = "color_depth"
|
||||
CONF_DRAW_ROUNDING = "draw_rounding"
|
||||
CONF_ON_RECEIVE = "on_receive"
|
||||
CONF_ON_STATE_CHANGE = "on_state_change"
|
||||
CONF_REQUEST_HEADERS = "request_headers"
|
||||
|
@ -157,8 +157,8 @@ std::shared_ptr<HttpContainer> HttpRequestIDF::perform(std::string url, std::str
|
||||
container->status_code = esp_http_client_get_status_code(client);
|
||||
container->feed_wdt();
|
||||
container->set_response_headers(user_data.response_headers);
|
||||
container->duration_ms = millis() - start;
|
||||
if (is_success(container->status_code)) {
|
||||
container->duration_ms = millis() - start;
|
||||
return container;
|
||||
}
|
||||
|
||||
@ -191,8 +191,8 @@ std::shared_ptr<HttpContainer> HttpRequestIDF::perform(std::string url, std::str
|
||||
container->feed_wdt();
|
||||
container->status_code = esp_http_client_get_status_code(client);
|
||||
container->feed_wdt();
|
||||
container->duration_ms = millis() - start;
|
||||
if (is_success(container->status_code)) {
|
||||
container->duration_ms = millis() - start;
|
||||
return container;
|
||||
}
|
||||
|
||||
|
@ -139,7 +139,7 @@ async def to_code(config):
|
||||
)
|
||||
)
|
||||
cg.add_library(
|
||||
None,
|
||||
"Sensirion Gas Index Algorithm",
|
||||
None,
|
||||
"https://github.com/Sensirion/arduino-gas-index-algorithm.git#3.2.1",
|
||||
)
|
||||
|
@ -1,6 +1,7 @@
|
||||
from esphome import automation
|
||||
from esphome.automation import Trigger
|
||||
import esphome.codegen as cg
|
||||
from esphome.components.const import CONF_ON_RECEIVE
|
||||
from esphome.components.packet_transport import (
|
||||
CONF_BINARY_SENSORS,
|
||||
CONF_ENCRYPTION,
|
||||
@ -27,7 +28,6 @@ trigger_args = cg.std_vector.template(cg.uint8)
|
||||
CONF_ADDRESSES = "addresses"
|
||||
CONF_LISTEN_ADDRESS = "listen_address"
|
||||
CONF_UDP_ID = "udp_id"
|
||||
CONF_ON_RECEIVE = "on_receive"
|
||||
CONF_LISTEN_PORT = "listen_port"
|
||||
CONF_BROADCAST_PORT = "broadcast_port"
|
||||
|
||||
|
@ -411,11 +411,16 @@ def add_referenced_recursive(referenced_schemas, config_var, path, eat_schema=Fa
|
||||
|
||||
s1 = get_str_path_schema(k)
|
||||
p = k.split(".")
|
||||
if len(p) == 3 and path[0] == f"{p[0]}.{p[1]}":
|
||||
# special case for schema inside platforms
|
||||
add_referenced_recursive(
|
||||
referenced_schemas, s1, [path[0], "schemas", p[2]]
|
||||
)
|
||||
if len(p) == 3:
|
||||
if path[0] == f"{p[0]}.{p[1]}":
|
||||
# special case for schema inside platforms
|
||||
add_referenced_recursive(
|
||||
referenced_schemas, s1, [path[0], "schemas", p[2]]
|
||||
)
|
||||
else:
|
||||
add_referenced_recursive(
|
||||
referenced_schemas, s1, [f"{p[0]}.{p[1]}", "schemas", p[2]]
|
||||
)
|
||||
else:
|
||||
add_referenced_recursive(
|
||||
referenced_schemas, s1, [p[0], "schemas", p[1]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user