Commit Graph

14222 Commits

Author SHA1 Message Date
J. Nick Koston cdf1adaa39 [api] Eliminate nullptr branch from write_protobuf_messages loop
Pre-compute the first message's header length before the loop to
initialize write_start/write_end. The first loop iteration naturally
skips memmove since src == write_end.

Extract varint_encoded_length_16/8 and plaintext_header_length as
reusable inline helpers from write_plaintext_header.
2026-04-01 22:20:56 -10:00
J. Nick Koston 06bc9462f1 [api] Deduplicate header code in plaintext write_protobuf_messages
Use a single loop for all messages instead of separate first-message
and loop paths. The first iteration skips memmove via the null check.
Eliminates duplicated write_plaintext_header inlining, reducing flash
from 326 to 229 bytes (-30%) while keeping the 64-byte stack frame.
2026-04-01 22:10:17 -10:00
J. Nick Koston f0edf10f95 [api] Pack batch messages contiguously for write() instead of writev()
Replace StaticVector<iovec> + writev() scatter-gather in the batch write
path with contiguous single-buffer write() calls.

Plaintext: compact messages via memmove to close 0-3 byte varint header
gaps, then write_raw_fast_buf_. Noise: messages are already contiguous
(fixed 7-byte header + 16-byte MAC fills all reserved space), switch
directly to write_raw_fast_buf_.

Fix LOG_PACKET_SENDING to log after write/enqueue to prevent re-entrant
log sends from corrupting the shared buffer before data is sent.
Consolidate the macro to api_frame_helper.cpp and expose via out-of-line
log_packet_sending_() helper.

Remove write_raw_fast_iov_ (no remaining callers) and change
encrypt_noise_message_ to return uint16_t length instead of iovec.
2026-04-01 21:45:18 -10:00
J. Nick Koston 0a9d36b09d Merge branch 'dev' into api/peel-first-write-iteration 2026-04-01 17:19:11 -10:00
J. Nick Koston 3fbf0f0c01 [api] Simplify encode_to_buffer to single resize call (#15355) 2026-04-02 03:13:09 +00:00
J. Nick Koston 1436d034bf [api] Inline DeferredBatch::add_item to eliminate push_back call barrier (#15353) 2026-04-02 03:11:47 +00:00
J. Nick Koston 08c7b3afbd [esp32_ble_tracker] Reduce scan cycle log spam (#15365) 2026-04-01 16:53:53 -10:00
J. Nick Koston 0df38cc62a Merge branch 'dev' into api/peel-first-write-iteration 2026-04-01 16:34:53 -10:00
J. Nick Koston f36d78e09c [core] Force inline Component::get_component_log_str() (#15363) 2026-04-01 16:15:00 -10:00
J. Nick Koston be56be5201 [core] Reduce runtime_stats measurement overhead (#15359) 2026-04-01 16:14:45 -10:00
J. Nick Koston 7954a770bd Merge branch 'dev' into api/peel-first-write-iteration 2026-04-01 16:12:46 -10:00
J. Nick Koston bcc7b8f490 [api] Add send_sensor_state benchmarks (#15352) 2026-04-01 16:12:02 -10:00
J. Nick Koston 27c662e73f [bluetooth_proxy] Replace loop() with set_interval for advertisement flushing (#15347) 2026-04-01 16:11:50 -10:00
Clyde Stubbs eefbb42be4 [lvgl] Add missing event names (#15362) 2026-04-02 14:16:56 +13:00
dependabot[bot] b5c4449a16 Bump pillow from 12.1.1 to 12.2.0 (#15361)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 14:11:44 -10:00
Boris Krivonog 5cdbbd4887 [mitsubishi_cn105] Add climate component for Mitsubishi A/C units with CN105 connector (Part 1) (#15315)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2026-04-01 11:48:47 -10:00
Clyde Stubbs bdce47e764 [lvgl] Fixes #4 (#15334) 2026-04-02 10:39:51 +13:00
Jesse Hills 813b142b72 Merge branch 'release' into dev 2026-04-02 09:07:41 +13:00
Jesse Hills b7dabe236e Merge pull request #15342 from esphome/bump-2026.3.2
2026.3.2
2026.3.2
2026-04-02 09:06:55 +13:00
Jonathan Swoboda 2e3ea2152d [esp32_camera] Bump esp32-camera to v2.1.6 (#15349) 2026-04-01 07:13:23 -10:00
J. Nick Koston ea609d3552 [runtime_stats] Store stats inline on Component to eliminate std::map lookup (#15345) 2026-04-01 07:09:04 -10:00
Gonçalo Pereira f33fd047ee [hdc2080] Add support for HDC2080 sensor (#9331)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
Co-authored-by: Big Mike <mikelawrence@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-04-01 12:09:22 -04:00
tomaszduda23 cc88896280 [debug] add peripherals status (#12053)
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@home-assistant.io>
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-04-01 15:04:22 +00:00
Edward Firmo fbfb5d401f [nextion] Fix memory leak in reset_() (#15344)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-31 22:34:29 -10:00
Rene Guca 212b3e1688 [cover] move time_based_cover to its own subdirectory (#15313)
Co-authored-by: Rene <rene@guca.at>
2026-03-31 21:59:24 -04:00
Kevin Ahrendt 31a70ab299 [resampler] Future-proof resampler task to avoid potential memory leaks (#15186) 2026-03-31 21:44:54 -04:00
Christian H 8f2cf8b8a7 [bmp581_base] Add support for BMP585 (#15277)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-31 21:39:41 -04:00
Jesse Hills 600ca01fd3 Bump version to 2026.3.2 2026-04-01 13:18:24 +13:00
J. Nick Koston 65051153ac [esp32_ble_tracker] Restart BLE scan after OTA failure (#15308)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2026-04-01 13:18:24 +13:00
Kevin Ahrendt 514c0c8331 [mixer] Fix memory leak in mixer task on stop/start cycles (#15185) 2026-04-01 13:18:24 +13:00
Edward Firmo dc634b8c7b [uart] fix baud rate not applied on load_settings() for ESP32 (IDF) (#15341) 2026-04-01 13:18:24 +13:00
Jonathan Swoboda 66a4acafd0 [tormatic] Fix UART stream desync on ESP32 (#15337) 2026-04-01 13:18:24 +13:00
Jonathan Swoboda 3bf45d8fe0 [haier] Fix hOn half-degree temperature setting (#15312) 2026-04-01 13:18:24 +13:00
Keith Burzinski 9cd7c5e700 [thermostat] Fix stale max_runtime_exceeded causing spurious supplemental heating/cooling (#15274) 2026-04-01 13:18:24 +13:00
J. Nick Koston d79cf1d718 [esp8266] Add enable_scanf_float option (#15284) 2026-04-01 13:18:24 +13:00
J. Nick Koston 3d8a3a91f2 [esp32_ble_server] Fix set_value action with static data lists (#15285) 2026-04-01 13:18:24 +13:00
Jonathan Swoboda 3fd3dcc7e5 [sgp4x] Fix NOx index_offset default (should be 1, not 100) (#15212) 2026-04-01 13:18:23 +13:00
Jonathan Swoboda 7b5a4b466a [uart] Fix debug callback missing peeked byte and reading past end (#15169) 2026-04-01 13:18:23 +13:00
Jonathan Swoboda 92642df419 [wifi] Filter fast_connect by band_mode and use background scan for roaming (#15152) 2026-04-01 13:18:23 +13:00
J. Nick Koston f5f99071fb [wifi] Fix roaming counter reset from delayed disconnect and successful retry (#15126) 2026-04-01 13:18:23 +13:00
J. Nick Koston cb15e98765 [datetime] Fix state_as_esptime() returning invalid timestamp (#15128) 2026-04-01 13:18:23 +13:00
Jonathan Swoboda 2f2c7ac393 [sx127x] Fix FIFO read corruption (#15114) 2026-04-01 13:18:23 +13:00
J. Nick Koston d9788aaefc [wifi] Reduce ESP8266 roaming scan dwell time to match ESP32 (#15127) 2026-04-01 13:18:23 +13:00
J. Nick Koston f7b410fd0c [wifi] Fix roaming attempt counter reset on disconnect during scan (#15099) 2026-04-01 13:18:23 +13:00
J. Nick Koston e261b5de65 [time] Point to valid IANA timezone list on validation failure (#15110) 2026-04-01 13:18:23 +13:00
J. Nick Koston 954227b203 [esp32_ble_tracker] Restart BLE scan after OTA failure (#15308)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2026-03-31 23:26:26 +00:00
Kevin Ahrendt 4a23ba7d8a [mixer] Fix memory leak in mixer task on stop/start cycles (#15185) 2026-04-01 12:06:48 +13:00
Edward Firmo b71c406e70 [uart] fix baud rate not applied on load_settings() for ESP32 (IDF) (#15341) 2026-04-01 12:04:07 +13:00
Jesse Hills 15bcd62f22 [internal_temperature] Move code into platform specific files (#15339) 2026-04-01 11:59:53 +13:00
J. Nick Koston 23dcc5389d [time] Fix strftime %Z and %z returning wrong timezone (#15330) 2026-04-01 11:59:45 +13:00