J. Nick Koston
760fa7c050
Merge branch 'dev' into esp32-millis-euclidean-decomposition
2026-03-02 09:28:12 -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
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
netixx and Jonathan 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
15a792ecce
bot review
2026-03-02 07:34:47 -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 Koston and Claude 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 Koston and Claude 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 Koston and Claude 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
Copilot and jesserockz
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
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
1e3f7b3c90
[core] Fix clang-tidy: lowercase function-local constexpr variables
...
clang-tidy readability-identifier-naming requires lowercase for
function-local variables, even constexpr ones. Rename D/Q/R to d/q/r.
2026-03-02 00:16:02 -10:00
J. Nick Koston
df57c21368
[core] Template micros_to_millis for both 32/64-bit results
...
Make micros_to_millis a template on return type (default uint32_t).
millis_64() now calls micros_to_millis<uint64_t>() to eliminate
__udivdi3 there too — same Euclidean decomposition, just with a
32x32->64 multiply for hi*Q instead of truncating.
Add 64-bit variant tests (140 total, all passing).
2026-03-02 00:11:02 -10:00
J. Nick Koston
99aa5043a3
[core] Add unit tests for micros_to_millis, make constexpr
...
Add Python unit tests (70 cases) verifying the Euclidean decomposition
matches us // 1000 across edge cases: small values, hi/lo boundaries,
carry-path overflow, realistic uptimes, and shift-boundary mod-8
variations.
Make micros_to_millis constexpr to enable compile-time validation
via static_assert.
2026-03-02 00:05:06 -10:00
J. Nick Koston
0dc56d7a4d
[core] Eliminate __udivdi3 in millis() on ESP32 and RP2040
...
On 32-bit targets GCC does not optimize 64-bit constant division
into a multiply-by-reciprocal, emitting a call to __udivdi3 instead
(~650-710 ns on Xtensa @ 240 MHz).
Add micros_to_millis() which exploits 1000 = 8 * 125: a free
right-shift by 3 followed by Euclidean decomposition with D=125,
reducing the 64-bit division to a single 32-bit / 125U that GCC
compiles to a multiply-by-reciprocal.
Benchmarked at 258 ns per call on ESP32 classic — a 2.5-2.8x
speedup. With ~21 millis() calls per loop iteration this saves
~9 us per loop.
2026-03-01 23:49:18 -10:00
Bonne Eggleston and J. Nick Koston
3160457ca6
Create integration tests for modbus ( #14395 )
...
Co-authored-by: J. Nick Koston <nick@home-assistant.io >
2026-03-01 22:51:27 -10:00
590ee81f7a
[openthread] Disable default enabled OT console build ( #14390 )
...
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
Co-authored-by: J. Nick Koston <nick@koston.org >
2026-03-02 06:16:36 +00:00
J. Nick Koston
9d4357c619
[core] Wake main loop from ISR in enable_loop_soon_any_context() ( #14383 )
2026-03-01 18:20:14 -10:00
J. Nick Koston
80a2acca4f
[ld2410] Add UART mock integration test for LD2410 component ( #14377 )
2026-03-01 18:19:32 -10:00
J. Nick Koston
f68a3ed15d
[api] Remove virtual destructor from ProtoMessage ( #14393 )
2026-03-01 18:09:00 -10:00
schrob
6d3d8970a6
[openthread] Disable default enabled OT diag code ( #14399 )
2026-03-01 22:47:02 -05:00
073ca63f60
[rtttl] improve comments Part 2 ( #13971 )
...
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com >
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-01 22:44:02 -05:00
J. Nick Koston and Claude Opus 4.6
0e18e4461e
[time,api] Send pre-parsed timezone struct over protobuf ( #14233 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-02 15:52:53 +13:00
J. Nick Koston
3e7424b307
[preferences] Reduce heap churn with small inline buffer optimization ( #13259 )
2026-03-02 14:22:55 +13:00
J. Nick Koston
48b5cae6c4
[api] Use StringRef for user service string arguments ( #13974 )
2026-03-02 10:32:44 +13:00
J. Nick Koston
a1760a1980
[improv_serial] Add missing USE_IMPROV_SERIAL define to fix WiFi scan filtering ( #14359 )
2026-03-02 09:23:10 +13:00
J. Nick Koston
19bbd39e33
[uart] Enable wake-on-RX by default on ESP32 ( #14391 )
2026-02-28 21:06:46 -06:00
J. Nick Koston and Copilot
3f97b3b706
[core] Extract set_status_flag_ helper to deduplicate status_set methods ( #14384 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-28 14:27:06 -10:00
J. Nick Koston
82e620bcf5
[ld2450] Single-pass zone target counting ( #14387 )
2026-02-28 14:26:55 -10:00
J. Nick Koston
80e0761bf1
[ld2450] Use integer dedup for direction text sensor updates ( #14386 )
2026-02-28 14:26:31 -10:00
J. Nick Koston
c0781d3680
[ld2450] Use atan2f for angle calculation ( #14388 )
2026-02-28 14:26:08 -10:00
J. Nick Koston
b7cb65ec49
[ci] Fix TypeError in ci-custom.py when POST lint checks fail ( #14378 )
2026-02-28 14:23:20 -10:00
J. Nick Koston
fdbfac15db
[uart] Replace wake-on-RX task+queue with direct ISR callback ( #14382 )
2026-03-01 00:21:08 +00:00
J. Nick Koston and Copilot
28424d6acd
[ld2410][ld2412] Fix signed char causing incorrect distance values ( #14380 )
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-28 23:50:12 +00:00
J. Nick Koston
b679b04d14
[core] Move CONF_STOP_BITS, CONF_DATA_BITS, CONF_PARITY to const.py ( #14379 )
2026-02-28 13:27:33 -10:00
Jonathan Swoboda and Copilot
b7d651dd17
[core] Defer entity automation codegen to prevent sibling ID deadlocks ( #14381 )
...
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com >
2026-02-28 13:10:53 -10:00
J. Nick Koston
757e8d90e6
[core] Inline set_component_state_ and use it in Application ( #14369 )
2026-02-28 07:20:34 -10:00
J. Nick Koston
7d52a9587f
[api] Outline keepalive ping logic from APIConnection::loop() ( #14374 )
2026-02-28 07:20:20 -10:00
J. Nick Koston
067d773aac
[core] Make register_component protected, remove runtime checks ( #14371 )
2026-02-28 07:19:55 -10:00
Clyde Stubbs
089d1e55e7
[mipi_dsi] Fix Waveshare P4 7B board config ( #14372 )
2026-02-28 20:37:04 +11:00
Raymond Richmond
6c0998f220
[gt911] Support for interrupt signal via IO Expander ( #14358 )
2026-02-28 18:26:06 +11:00
J. Nick Koston and Claude Opus 4.6
49cc389bf0
[esp32] Wrap printf/vprintf/fprintf to eliminate _vfprintf_r (~11 KB flash) ( #14362 )
...
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-27 17:28:05 -10:00
J. Nick Koston
8480e8df9f
[uart] Revert UART0 default pin workarounds (fixed in ESP-IDF 5.5.2) ( #14363 )
2026-02-27 17:27:51 -10:00
J. Nick Koston
e7d4f2608b
[sen6x] Fix test sensor ID collisions with sen5x ( #14367 )
2026-02-27 16:01:17 -10:00