Commit Graph
24340 Commits
Author SHA1 Message Date
J. Nick Koston 4081f490d6 Merge remote-tracking branch 'upstream/dev' into integration
# Conflicts:
#	esphome/components/api/api_frame_helper.h
#	esphome/core/application.h
2026-03-08 16:44:41 -10:00
Jonathan SwobodaandClaude Opus 4.6 5b9cab02be [multiple] Add default initializers to uninitialized member variables (#14636)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 22:37:54 -04:00
cac751e9e8 [nextion] Add configurable HTTP parameters for TFT upload (#14234)
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: J. Nick Koston <nick@koston.org>
2026-03-09 01:29:41 +00:00
6ba5c9a705 [api] Skip state_action_() call in noise data path (#14629)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 01:22:39 +00:00
J. Nick Koston c681dc8872 [socket] Add socket wake support for RP2040 (#14498) 2026-03-08 15:11:24 -10:00
J. Nick KostonandClaude Opus 4.6 d0285cdc41 [core] Pack entity flags into configure_entity_() and protect setters (#14564)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:11:15 -10:00
J. Nick Koston 9cc56b82a9 Merge remote-tracking branch 'upstream/dev' into integration
# Conflicts:
#	tests/integration/fixtures/uart_mock_ld2450.yaml
#	tests/integration/test_uart_mock_ld2450.py
2026-03-08 14:57:36 -10:00
J. Nick Koston 9547a54fac [const] Move CONF_ENABLE_FULL_PRINTF to const.py (#14633) 2026-03-08 14:52:40 -10:00
J. Nick Koston b05dbfccd3 [api] Bump noise-c to 0.1.11 (#14632) 2026-03-08 14:52:21 -10:00
J. Nick Koston c76c734bb7 Merge branch 'bump-noise-c-0.1.11' into integration 2026-03-08 14:42:41 -10:00
J. Nick Koston aef2d74e41 [ld2450] Add integration tests with mock UART (#14611) 2026-03-08 14:32:59 -10:00
J. Nick Koston e1c849d5d2 [esp8266] Wrap printf/vprintf/fprintf to eliminate _vfiprintf_r (~1.6 KB flash) (#14621) 2026-03-08 14:32:47 -10:00
J. Nick Koston c11ad7f0e6 [rp2040] Wrap printf/vprintf/fprintf to eliminate _vfprintf_r (~9.2 KB flash) (#14622) 2026-03-08 14:32:35 -10:00
J. Nick KostonandClyde Stubbs 88536ff72b [modbus] Fix timeout for non-hardware UARTs (e.g., USB UART) (#14614)
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
2026-03-08 14:31:42 -10:00
J. Nick Koston 93d7ec4d72 [esp32_ble] Inline ble_addr_to_uint64 to eliminate call overhead (#14591) 2026-03-08 14:07:59 -10:00
J. Nick Koston 66a5ad0d75 [core] Skip zero-initialization of StaticVector data array (#14592) 2026-03-08 14:06:55 -10:00
J. Nick Koston 771404668d [api] Inline fast path of try_to_clear_buffer (#14630) 2026-03-08 14:01:01 -10:00
J. Nick Koston 76c567a71c [scheduler] Use std::atomic<uint8_t> instead of std::atomic<bool> for remove flag (#14626) 2026-03-08 14:00:04 -10:00
J. Nick Koston e7730cff00 [esp32_ble] Optimize BLE event hot path performance (#14627) 2026-03-08 13:59:40 -10:00
J. Nick Koston 005df9e305 [api] Bump noise-c to 0.1.11
Updates noise-c dependency which brings libsodium 1.10021.0:
- libsodium updated to 1.0.21
- Optimized poly1305 and chacha20 with aligned loads for embedded targets
- Fix ChaCha20-Poly1305 AEAD source path
2026-03-08 13:45:32 -10:00
J. Nick Koston 1be1207bdc Revert "Merge branch 'libsodium-native-le' into integration"
This reverts commit 94fb2ae556, reversing
changes made to 947115b1cf.
2026-03-08 12:19:01 -10:00
J. Nick Koston 8fa7cb18d4 Revert "Merge branch 'libsodium-native-le' into integration"
This reverts commit c49957fe9a, reversing
changes made to 3cde02443d.
2026-03-08 12:19:01 -10:00
d5dc4a39cb [i2s_audio] Fix mono sample swap and block 8-bit mono on ESP32 (#14516)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-03-08 12:10:43 -10:00
Keith Burzinski 50b3f9d25c [mixer_speaker] Add task debounce (#14581) 2026-03-08 18:09:06 -04:00
J. Nick Koston c49957fe9a Merge branch 'libsodium-native-le' into integration 2026-03-08 12:01:04 -10:00
J. Nick KostonandClaude Opus 4.6 6c7e052049 [api] Exclude ESP8266 from NATIVE_LITTLE_ENDIAN optimization
ESP8266's older Arduino GCC doesn't optimize small memcpy into single
load/store instructions, making the memcpy path 16 bytes larger than
byte-at-a-time on that platform.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 12:00:51 -10:00
J. Nick Koston 3cde02443d Merge remote-tracking branch 'upstream/api-inline-try-to-clear-buffer' into integration 2026-03-08 11:56:28 -10:00
J. Nick Koston 94fb2ae556 Merge branch 'libsodium-native-le' into integration 2026-03-08 11:56:18 -10:00
J. Nick KostonandClaude Opus 4.6 aacbb6659e [api] Define NATIVE_LITTLE_ENDIAN for libsodium on all targets
libsodium's autoconf-generated config normally sets NATIVE_LITTLE_ENDIAN,
but PlatformIO skips autoconf. Without this define, libsodium falls back
to byte-at-a-time load/store operations in poly1305 and chacha20 instead
of optimized 32-bit memcpy. This saves ~340 bytes of flash and improves
encryption/decryption throughput on every API noise packet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 11:55:38 -10:00
J. Nick KostonandClaude Opus 4.6 813e893508 [api] Define NATIVE_LITTLE_ENDIAN for libsodium on all targets
libsodium's autoconf-generated config normally sets NATIVE_LITTLE_ENDIAN,
but PlatformIO skips autoconf. Without this define, libsodium falls back
to byte-at-a-time load/store operations in poly1305 and chacha20 instead
of optimized 32-bit memcpy. This saves ~340 bytes of flash and improves
encryption/decryption throughput on every API noise packet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 11:54:32 -10:00
J. Nick KostonandClaude Opus 4.6 34abc08f04 [api] Define NATIVE_LITTLE_ENDIAN for libsodium on all targets
libsodium's autoconf-generated config normally sets NATIVE_LITTLE_ENDIAN,
but PlatformIO skips autoconf. Without this define, libsodium falls back
to byte-at-a-time load/store operations in poly1305 and chacha20 instead
of optimized 32-bit memcpy. This saves ~340 bytes of flash and improves
encryption/decryption throughput on every API noise packet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 11:54:11 -10:00
J. Nick Koston 74a0052787 [api] Inline fast path of try_to_clear_buffer
Move the common-case checks (flags_.remove and can_write_without_blocking)
into an inline method in the header, leaving only the slow path (delay,
loop, retry) in the .cpp file. This avoids a function call on every
send_buffer() invocation when the TX buffer is already clear.
2026-03-08 11:47:19 -10:00
J. Nick Koston 947115b1cf Merge branch 'skip-state-action-data-path' into integration 2026-03-08 11:30:48 -10:00
J. Nick Koston 956977bd4b [api] Skip state_action_() call in noise data path
The noise frame helper was calling state_action_() (447 bytes) on every
read_packet() and write_protobuf_messages() call. In the DATA state
(steady-state after handshake), this function falls through all handshake
checks and returns OK — pure overhead on every encrypted packet.

Add check_data_state_() inline helper that replaces the call with a
single byte-load + branch instruction in the hot path. The handshake
state machine continues to be driven by loop() as before.

Also applies consistent state checking to the plaintext frame helper.
2026-03-08 11:27:40 -10:00
J. Nick Koston 2edf062a6a Merge remote-tracking branch 'origin/warn-crystal-mismatch' into integration 2026-03-08 11:16:03 -10:00
J. Nick Koston ad5811280a [ci] Add medium-pr label for PRs with ≤100 lines changed (#14628) 2026-03-08 10:59:43 -10:00
tomaszduda23andJ. Nick Koston 9be1876fae [ble_nus] make ble_nus timeout shorter than watchdog (#14619)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
2026-03-08 10:52:16 -10:00
J. Nick Koston c28ad8872d Merge remote-tracking branch 'upstream/esp32-ble-hot-path-perf' into integration 2026-03-08 09:30:45 -10:00
J. Nick KostonandClaude Opus 4.6 665b0143f9 [esp32_ble] Optimize BLE event hot path performance
- LockFreeQueue: Add fast-path check to get_and_reset_dropped_count().
  On Xtensa, uint16_t atomic exchange compiles to ~25 instructions with
  a CAS retry loop and memory barriers. A relaxed load (single instruction)
  short-circuits the common case where dropped_count is zero.

- BLEEvent: Remove redundant release() calls in load_*_event() methods.
  EventPool::release() already calls event->release() before returning
  events to the free list, so every event from allocate() is already clean.

- BLEEvent::release(): Only null heap_data on the delete path. Skip
  unconditional zeroing of is_inline and heap_data when data was inline
  (no heap allocation to clean up).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 09:24:10 -10:00
J. Nick Koston 7b1ddcdc26 Merge branch 'scheduler-atomic-uint8' into integration 2026-03-08 08:41:27 -10:00
J. Nick Koston 706fdc66fb [scheduler] Use std::atomic<uint8_t> instead of std::atomic<bool> for remove flag
GCC on Xtensa (ESP32) generates an indirect function call for
std::atomic<bool>::load() instead of inlining it. This adds unnecessary
call overhead on the scheduler hot path where the remove flag is checked
multiple times per loop iteration.

std::atomic<uint8_t>::load() inlines correctly on all platforms,
producing a simple load instruction with memory barrier. This eliminates
5 indirect calls and saves 30 bytes of flash on the scheduler hot path.
2026-03-08 08:40:54 -10:00
dependabot[bot] 1b3a7f0b6a Bump aioesphomeapi from 44.5.0 to 44.5.1 (#14624)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-08 18:18:14 +00:00
J. Nick Koston cb4d969ffc Merge remote-tracking branch 'upstream/dev' into integration 2026-03-08 08:16:26 -10:00
Diorcet Yann 3f143d9f19 [ethernet] Fix commit 3f700bac1c (#14618) 2026-03-08 09:50:32 -04:00
J. Nick Koston d59c2c3435 Merge branch 'esp8266-wrap-printf' into integration 2026-03-08 01:33:36 -10:00
J. Nick Koston 940cf8f206 Merge branch 'rp2040-wrap-printf' into integration 2026-03-08 01:33:31 -10:00
J. Nick Koston f13a2e08da Add enable_full_printf test coverage 2026-03-08 01:32:25 -10:00
J. Nick Koston 1e3eac2568 Add enable_full_printf test coverage 2026-03-08 01:32:05 -10:00
J. Nick Koston 3d1f7cea72 Increase printf stub buffer to 512 bytes to match ESP32 2026-03-08 01:26:31 -10:00
J. Nick Koston 66374edd6d Fix comments: ESP8266 logging uses Serial, not ets_printf 2026-03-08 01:22:35 -10:00