Commit Graph
23730 Commits
Author SHA1 Message Date
J. Nick Koston 49750eb3ad Add static_assert for MAIN_TASK_PRIORITY < configMAX_PRIORITIES 2026-03-02 15:30:21 -10:00
J. Nick Koston 7692ef6292 Merge branch 'fix-bk72xx-loop-time' into integration 2026-03-02 13:51:21 -10:00
J. Nick Koston e6c1a4670c [bk72xx] Fix ~100ms loop stalls by raising main task priority
The BK72xx SDK creates the main Arduino task at FreeRTOS priority 3,
which is lower than all WiFi (4-5), LwIP (4), and TCP/IP (7) tasks.
This causes the main loop to be preempted for ~100ms whenever WiFi
background processing runs (beacon handling, DHCP, WPA supplicant).

By contrast, RTL87xx creates its main task at osPriorityRealtime
(the highest priority), so it never experiences this issue.

Raise the BK72xx main task priority to 6 during arch_init(): above
WiFi/LwIP tasks (4-5) so they don't preempt the main loop, but below
the TCP/IP thread (7) so packet processing keeps priority. This is
safe because ESPHome yields voluntarily via yield_with_select_() and
the Arduino mainTask yield() after each loop() iteration.

Tested on CB3S (BK7231N) - loop time drops from ~110ms to ~14ms.
2026-03-02 13:48:26 -10:00
J. Nick Koston 37738a2e95 Merge branch 'fix-ble-client-disconnect-race' into integration 2026-03-02 13:11:50 -10:00
J. Nick Koston 7719d07548 [esp32_ble_client] Log when DISCONNECT_EVT arrives after CLOSE_EVT 2026-03-02 13:11:15 -10:00
J. Nick Koston 54dff58460 Merge remote-tracking branch 'upstream/fix-ble-client-disconnect-race' into integration 2026-03-02 13:07:26 -10:00
J. Nick Koston 3988818fb8 handle close before disconnect 2026-03-02 13:05:01 -10:00
J. Nick Koston 7e4191028a Merge remote-tracking branch 'upstream/dev' into integration 2026-03-02 10:33:54 -10:00
Jonathan SwobodaandClaude Opus 4.6 38f671a923 [uart] Fix flow_control_pin inverted flag ignored on ESP-IDF (#14410)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 08:52:06 +13:00
J. Nick Koston 74eda7fc01 Merge remote-tracking branch 'origin/pack-entity-strings' into integration 2026-03-02 09:31:46 -10:00
J. Nick Koston bd35d55729 Merge remote-tracking branch 'origin/esp8266-wake-loop-any-context' into integration 2026-03-02 09:30:43 -10:00
J. Nick Koston 483b3cc553 Merge remote-tracking branch 'origin/esp32-millis-euclidean-decomposition' into integration 2026-03-02 09:30:38 -10:00
J. Nick Koston 9e97413a66 Merge branch 'dev' into pack-entity-strings 2026-03-02 09:28:23 -10:00
J. Nick Koston 760fa7c050 Merge branch 'dev' into esp32-millis-euclidean-decomposition 2026-03-02 09:28:12 -10:00
J. Nick Koston d0930a4766 lint 2026-03-02 09:20:09 -10:00
J. Nick Koston 641d188dec lint 2026-03-02 09:19:58 -10:00
J. Nick Koston d55cf73021 Merge branch 'dev' into esp8266-wake-loop-any-context 2026-03-02 09:18:14 -10:00
J. Nick Koston cb232d8288 [core] Fix compile-time loop() detection for multiple inheritance (#14411) 2026-03-02 19:11:47 +00:00
J. Nick Koston 2fa244715d [socket] Fix pre-existing bugs found during socket devirtualization review (#14404) 2026-03-02 08:54:54 -10:00
J. Nick Koston a802cbcf47 Merge remote-tracking branch 'upstream/esp8266-wake-loop-any-context' into integration 2026-03-02 08:47:56 -10:00
J. Nick Koston fda0e784d3 switch to forward dec 2026-03-02 08:47:16 -10:00
J. Nick Koston e32adb8633 Merge remote-tracking branch 'upstream/fix-loop-ambiguous-multiple-inheritance' into integration 2026-03-02 08:15:30 -10:00
J. Nick Koston d088c98218 Merge remote-tracking branch 'upstream/esp8266-wake-loop-any-context' into integration 2026-03-02 08:15:26 -10:00
J. Nick Koston 9e4a04b732 Merge branch 'dev' into esp8266-wake-loop-any-context 2026-03-02 08:11:10 -10:00
J. Nick Koston b8e7870115 Rename has_loop_override to HasLoopOverride for clang-tidy naming 2026-03-02 08:09:59 -10:00
J. Nick Koston 8ee800bb35 Merge remote-tracking branch 'upstream/esp32-millis-euclidean-decomposition' into integration 2026-03-02 07:53:19 -10:00
J. Nick Koston 4b11b6b941 Merge remote-tracking branch 'upstream/fix-loop-ambiguous-multiple-inheritance' into integration 2026-03-02 07:53:12 -10:00
J. Nick Koston 5ed3be7b97 [core] Fix compile-time loop() detection for multiple inheritance
The compile-time loop() override detection using decltype(&T::loop)
fails when a component inherits from both Component (via
PollingComponent) and BLEClientNode, as both define loop() methods
making the expression ambiguous.

Add a SFINAE-based has_loop_override<T> trait that gracefully handles
this case: when decltype(&T::loop) is ill-formed due to ambiguity,
it falls back to true (conservatively assuming a loop override exists).
2026-03-02 07:50:34 -10:00
J. Nick Koston 1617da2541 [core] Remove static_asserts for micros_to_millis
Covered by integration test now.
2026-03-02 07:44:43 -10:00
J. Nick Koston 96a564a6e9 [core] Replace Python unit tests with C++ integration test for micros_to_millis
The Python tests were testing a Python reimplementation, not the
actual C++ code. Replace with an integration test that exercises
the real micros_to_millis() on the host platform, covering boundary
values, carry paths, and mod-8 shift edge cases (25 checks).
2026-03-02 07:41:52 -10:00
netixxandJonathan Swoboda b9b1af1c3d [mcp23016] Fix register access to use 16-bit paired transactions (#13676)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-03-02 17:38:28 +00:00
J. Nick Koston 61eb8f3e14 Merge remote-tracking branch 'upstream/cache-lwip-sock-pointers' into integration
# Conflicts:
#	esphome/components/esp32/core.cpp
#	esphome/components/esp8266/core.cpp
#	esphome/components/host/core.cpp
#	esphome/components/libretiny/core.cpp
#	esphome/components/rp2040/core.cpp
#	esphome/components/zephyr/core.cpp
#	esphome/core/application.cpp
#	esphome/core/hal.h
2026-03-02 07:38:28 -10:00
J. Nick Koston 15a792ecce bot review 2026-03-02 07:34:47 -10:00
J. Nick Koston deea16698d Add tests for setup_entity direct-call and decorator modes 2026-03-02 07:13:49 -10:00
J. Nick Koston d7bb574d26 Add return type hint to _do() 2026-03-02 07:13:00 -10:00
J. Nick Koston c0c02e5c57 Make setup_entity work as both decorator and direct call
Address review feedback: support both @setup_entity("sensor")
decorator mode and await setup_entity(var, config, "camera")
direct-call mode to maintain backward compatibility with external
components that use the direct-call API.

Simplify esp32_camera to use the direct-call form instead of
a no-op decorated wrapper function.
2026-03-02 07:12:19 -10:00
J. Nick Koston bca46bce81 Merge remote-tracking branch 'upstream/dev' into cache-lwip-sock-pointers
# Conflicts:
#	esphome/components/socket/bsd_sockets_impl.cpp
#	esphome/components/socket/bsd_sockets_impl.h
#	esphome/components/socket/lwip_sockets_impl.cpp
#	esphome/components/socket/lwip_sockets_impl.h
#	esphome/components/socket/socket.cpp
#	esphome/components/socket/socket.h
#	esphome/core/application.h
2026-03-02 07:11:40 -10:00
J. Nick KostonandClaude Opus 4.6 0f9c71714e Merge remote-tracking branch 'upstream/dev' into pack-entity-strings
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 07:05:08 -10:00
J. Nick Koston a1d91ac779 [core] Compile-time detection of loop() overrides (#14405) 2026-03-02 06:59:23 -10:00
J. Nick Koston 585e195044 [socket] Devirtualize socket abstraction layer (#14398) 2026-03-02 06:58:31 -10:00
J. Nick Koston 39572d9628 [light] Resolve effect names to indices at codegen time (#14265) 2026-03-02 06:58:15 -10:00
J. Nick Koston f278250740 [core] Deduplicate ControllerRegistry notify dispatch loop (#14394) 2026-03-02 06:57:59 -10:00
J. Nick KostonandClaude Opus 4.6 54f410901f [web_server] Avoid temporary std::string allocations in request parameter parsing (#14366)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 06:57:39 -10:00
J. Nick KostonandClaude Opus 4.6 00242443e1 [light] Replace powf gamma with pre-computed lookup tables (LUT) (#14123)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 06:57:23 -10:00
J. Nick Koston 82da4935b6 [core] Auto-wrap static strings in PROGMEM on ESP8266 via TemplatableValue (#13885) 2026-03-02 06:57:08 -10:00
J. Nick KostonandClaude Opus 4.6 1c5fd8bbd4 [core] Move millis_64 rollover tracking out of Scheduler (#14360)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 06:56:51 -10:00
Copilotandjesserockz 77a7cbcffd Use cached files on network errors in external_files (#14055)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jesserockz <3060199+jesserockz@users.noreply.github.com>
2026-03-02 11:41:20 -05:00
J. Nick Koston 5041bc06aa Merge remote-tracking branch 'upstream/esp32-millis-euclidean-decomposition' into integration 2026-03-02 00:22:05 -10:00
J. Nick Koston cff32556a2 Add static_asserts and type hints to tests
Add compile-time static_asserts for micros_to_millis correctness.
Add parameter type hints and return annotations to test functions.
2026-03-02 00:21:44 -10:00
J. Nick Koston 696c93ee43 Merge remote-tracking branch 'upstream/esp32-millis-euclidean-decomposition' into integration 2026-03-02 00:16:16 -10:00