Commit Graph
26230 Commits
Author SHA1 Message Date
J. Nick Koston c2c34d39e7 [text_sensor] Assert size before writing, not after 2026-03-27 15:55:56 -10:00
J. Nick Koston 787af59845 [text_sensor] Assert size before writing, not after 2026-03-27 15:55:29 -10:00
J. Nick Koston 3e7dcc6490 [binary_sensor] Assert size before writing, not after 2026-03-27 15:54:44 -10:00
J. Nick Koston f48eff29c3 Fix ::operator new / delete[] mismatch — use ::operator delete to match 2026-03-27 15:54:40 -10:00
J. Nick Koston f9c2d60b7d [binary_sensor] Assert size before writing, not after 2026-03-27 15:54:12 -10:00
J. Nick Koston fe8e7c134c Add debug assert for uint16_t overflow in callback_manager_grow 2026-03-27 15:53:47 -10:00
J. Nick Koston 55963a6ea0 [sensor] Assert size before writing, not after 2026-03-27 15:53:18 -10:00
J. Nick Koston 1bdf6402a2 Move grow path to helpers.cpp as non-template function
Since Callback is trivially copyable regardless of signature,
the grow logic is type-independent. Move it to a concrete
function in helpers.cpp using void*/memcpy, eliminating the
template definition from the header entirely.
2026-03-27 15:52:33 -10:00
J. Nick Koston 4cb1164a01 [sensor] Assert size before writing, not after 2026-03-27 15:52:16 -10:00
J. Nick Koston 3d68920de0 [sensor] Assert size before writing, not after 2026-03-27 15:51:05 -10:00
J. Nick Koston 70a9c2f8b6 [sensor] Assert size before writing, not after 2026-03-27 15:49:57 -10:00
J. Nick Koston 29b5b3eba1 Move CallbackManager growth path out-of-line
Split add_() into inline fast path (size check + store) and
noinline cold grow_() for the allocation/memcpy/delete path.
Prevents the cold growth code from bloating every call site.
2026-03-27 15:48:52 -10:00
J. Nick Koston a28f331f73 [text_sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT 2026-03-27 15:48:10 -10:00
J. Nick Koston f47799a645 [text_sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT 2026-03-27 15:48:09 -10:00
J. Nick Koston 869bafe338 [binary_sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT 2026-03-27 15:48:07 -10:00
J. Nick Koston f8138eef77 [binary_sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT 2026-03-27 15:48:07 -10:00
J. Nick Koston aae1edda0d [sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT 2026-03-27 15:48:06 -10:00
J. Nick Koston f162c5acd3 [sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT 2026-03-27 15:48:05 -10:00
J. Nick Koston 8a93b0c1c0 [sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT 2026-03-27 15:48:04 -10:00
J. Nick Koston c8609af6ce [sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT 2026-03-27 15:47:56 -10:00
J. Nick Koston 69d3f563d5 [core] Replace std::vector in CallbackManager with trivial-copy container
Replace std::vector<Callback<void(Ts...)>> with a minimal container
that exploits Callback's trivially-copyable nature. Since Callback is
just {fn_ptr, ctx_ptr}, reallocation is a plain __builtin_memcpy
instead of std::vector's exception-safe move/copy machinery.

Uses uint16_t for size/capacity (8 bytes on 32-bit vs 12 for
std::vector), and grows to exact size since callbacks are registered
during setup() and most instances have 0-1 callbacks.

Eliminates _M_realloc_insert/_M_default_append template instantiations
per callback signature type.
2026-03-27 15:43:36 -10:00
J. Nick Koston f1221602f4 [binary_sensor] Move deleted copy/move to public (clang-tidy modernize-use-equals-delete) 2026-03-27 15:26:24 -10:00
J. Nick Koston cef546c8d8 [binary_sensor] Move deleted copy/move to public (clang-tidy modernize-use-equals-delete) 2026-03-27 15:26:03 -10:00
J. Nick Koston 2f1434c027 Merge remote-tracking branch 'upstream/text_sensor_map_static_array' into integration 2026-03-27 15:18:18 -10:00
J. Nick Koston 5997556586 Merge remote-tracking branch 'upstream/text_sensor_substitute_static_array' into integration 2026-03-27 15:18:18 -10:00
J. Nick Koston 755a9d3bd5 Merge remote-tracking branch 'upstream/binary_sensor_multiclick_static_array' into integration 2026-03-27 15:18:18 -10:00
J. Nick Koston ed352222d2 Merge remote-tracking branch 'upstream/binary_sensor_autorepeat_static_array' into integration 2026-03-27 15:18:18 -10:00
J. Nick Koston 910b910b0b Merge remote-tracking branch 'upstream/sensor_calibrate_polynomial_static_array' into integration 2026-03-27 15:18:08 -10:00
J. Nick Koston 3617435fd7 Merge remote-tracking branch 'upstream/sensor_calibrate_linear_static_array' into integration 2026-03-27 15:18:08 -10:00
J. Nick Koston 8942bbb43f Merge remote-tracking branch 'upstream/sensor_or_filter_static_array' into integration 2026-03-27 15:18:08 -10:00
J. Nick Koston 8066cc440a Merge remote-tracking branch 'upstream/sensor_value_list_static_array' into integration 2026-03-27 15:18:08 -10:00
J. Nick Koston 6f506671e9 Merge remote-tracking branch 'upstream/dev' into sensor_value_list_static_array 2026-03-27 15:11:29 -10:00
J. Nick Koston df154189c4 [binary_sensor] Delete copy/move on MultiClickTriggerBase (pointer would dangle) 2026-03-27 15:06:25 -10:00
J. Nick Koston 115d84b2a7 [binary_sensor] Delete copy/move on AutorepeatFilterBase (pointer would dangle) 2026-03-27 15:05:19 -10:00
Jonathan Swoboda 47774fb644 [modbus_controller] Fix wrong enum in function_code_to_register (#15253) 2026-03-27 19:55:57 -04:00
Jonathan Swoboda 34410e92b7 [as5600] Remove dead angle/position sensor code (#15254) 2026-03-27 19:55:40 -04:00
Edward Firmoandpre-commit-ci-lite[bot] a99f051e19 [nextion] Replace queue name string literals with short Nextion-native identifiers (#15215)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-27 13:49:00 -10:00
J. Nick Koston 5dc3291d3a Merge branch 'dev' into binary_sensor_autorepeat_static_array 2026-03-27 13:43:00 -10:00
J. Nick Koston 01d3546b33 Merge branch 'dev' into text_sensor_map_static_array 2026-03-27 13:42:52 -10:00
J. Nick Koston 9fd267d606 Merge branch 'dev' into binary_sensor_multiclick_static_array 2026-03-27 13:42:31 -10:00
J. Nick Koston 810a1d3879 Merge branch 'dev' into text_sensor_substitute_static_array 2026-03-27 13:41:34 -10:00
J. Nick Koston d3753a9d41 Merge branch 'dev' into sensor_calibrate_polynomial_static_array 2026-03-27 13:41:20 -10:00
J. Nick Koston dd76f60985 Merge branch 'dev' into sensor_value_list_static_array 2026-03-27 13:40:47 -10:00
J. Nick Koston 0cd872c84e Merge branch 'dev' into sensor_or_filter_static_array 2026-03-27 13:40:40 -10:00
J. Nick Koston 2ea1ebf8c7 Merge branch 'dev' into sensor_calibrate_linear_static_array 2026-03-27 13:40:29 -10:00
J. Nick Koston 27c609531d [text_sensor] Use std::array in MapFilter 2026-03-27 13:34:36 -10:00
J. Nick Koston f81e8946ed [binary_sensor] Use std::array in MultiClickTrigger 2026-03-27 13:34:35 -10:00
J. Nick Koston 83eb723c62 [binary_sensor] Use std::array in AutorepeatFilter 2026-03-27 13:33:46 -10:00
J. Nick Koston a2856cf87b [text_sensor] Use std::array in SubstituteFilter 2026-03-27 13:33:39 -10:00
J. Nick Koston e6b06551bc [sensor] Use std::array in ValueList/FilterOut/ThrottleWithPriority filters
Template ValueListFilter, FilterOutValueFilter, and ThrottleWithPriorityFilter
on N (set by code generation) to use std::array instead of FixedVector.

Non-template helpers value_list_matches_any() and get_loop_component_start_time()
keep shared logic in the .cpp to avoid per-instantiation flash duplication.
2026-03-27 13:33:19 -10:00