Commit Graph
26792 Commits
Author SHA1 Message Date
J. Nick Koston b8981aae12 Revert write_short_string for non-forced strings
Inlining the empty check + write_short_string for every non-forced
string field doubles code size vs a single encode_string call.
2026-04-06 08:49:37 -10:00
J. Nick Koston 4099064207 Use write_short_string for non-forced strings with max_data_length < 128
Add empty check wrapper for non-forced short strings instead of falling
through to the general encode_string path.
2026-04-06 08:43:24 -10:00
J. Nick KostonandClaude Opus 4.6 33285dfe27 Fix merge issues: write_short_string to static ProtoEncode, add debug arg
- Convert ProtoEncode::write_short_string to static method with pos param
- Fix codegen to emit ProtoEncode::write_short_string(pos, ...)
- Add PROTO_ENCODE_DEBUG_INIT to encode_fn call in encode_to_buffer

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 08:33:13 -10:00
J. Nick KostonandClaude Opus 4.6 7122fb6f88 Merge remote-tracking branch 'upstream/api-sint32-short-varint' into integration
Fix double static_cast in enum encode precomputed tag path by
passing raw field ref instead of pre-cast value_expr.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 08:31:05 -10:00
J. Nick Koston 972c919ac0 Merge remote-tracking branch 'upstream/api-proto-max-length' into integration 2026-04-05 19:12:29 -10:00
J. Nick Koston 4e99510624 [api] Fix comment source references and add missing max_data_length
- Fix comment: NAME_MAX_LENGTH is in config_validation.py, not core/config.py
- Add missing max_data_length=63 to unit_of_measurement in ListEntitiesNumberResponse
2026-04-05 19:07:22 -10:00
J. Nick Koston 8fc7cdbe28 Merge remote-tracking branch 'upstream/api-enum-auto-max-value' into integration 2026-04-05 19:04:51 -10:00
J. Nick Koston fef4ff4a82 [api] Remove encode_small_varint — no real benefit over encode_uint32 2026-04-05 19:04:01 -10:00
J. Nick Koston 03d64317c7 Merge remote-tracking branch 'upstream/api-enum-auto-max-value' into integration 2026-04-05 18:58:09 -10:00
J. Nick Koston d5b5a6a4a7 [api] Don't use encode_small_varint for forced fields (must encode zero) 2026-04-05 18:57:04 -10:00
J. Nick Koston 307f436229 [api] Move zero-check into encode_small_varint to simplify call sites 2026-04-05 18:56:10 -10:00
J. Nick Koston 27a16ca97c [api] Use local pointer in encode_small_varint to avoid aliased pos_ stores 2026-04-05 18:54:39 -10:00
J. Nick Koston 883a300785 [api] Add encode_small_varint helper for single-byte tag+value encoding
Replace two separate write_raw_byte calls with a single
encode_small_varint(tag, value) call that writes both bytes
with one bounds check. Used for enum fields with max < 128.
2026-04-05 18:53:48 -10:00
J. Nick Koston 5a6330e366 [api] Remove redundant uint32_t cast in enum raw byte writes 2026-04-05 18:51:14 -10:00
J. Nick Koston 5c178eab63 [api] Optimize encode for non-forced enum fields with single-byte tags
When an enum field has max_value < 128 and a single-byte tag, emit
inline write_raw_byte calls instead of calling encode_uint32, which
avoids encode_field_raw and encode_varint_raw function call overhead.
2026-04-05 18:50:23 -10:00
J. Nick Koston 2b8311182a Merge remote-tracking branch 'upstream/api-proto-max-length' into integration 2026-04-05 18:42:52 -10:00
J. Nick Koston 2d43d07490 Merge branch 'dev' into api-proto-max-length 2026-04-05 18:42:30 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> 1c97954b47 Bump aioesphomeapi from 44.9.0 to 44.9.1 (#15470)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-05 18:42:17 -10:00
J. Nick Koston 3f7e636f7a Merge remote-tracking branch 'upstream/api-enum-auto-max-value' into integration 2026-04-05 18:40:32 -10:00
J. Nick Koston bc47757af1 Merge remote-tracking branch 'upstream/dev' into integration 2026-04-05 18:39:27 -10:00
Boris Krivonog 859ea23bde [mitsubishi_cn105] Add climate component for Mitsubishi A/C units with CN105 connector (Part 4) (#15462) 2026-04-05 18:33:02 -10:00
J. Nick Koston acd2fc3711 [api] Use multiply instead of loop for constant-size repeated enums
When a repeated enum field has a constant size per element (max < 128),
emit size * constant instead of iterating. This fixes unused variable
warnings from clang-tidy and generates more efficient code.
2026-04-05 18:29:01 -10:00
J. Nick Koston 0fc3664441 [api] Auto-derive max_value for enum fields in protobuf codegen
The protobuf code generator already parses all enum definitions and
knows every enum's maximum value. Use this to automatically apply the
max_value < 128 optimization to all enum fields, eliminating the need
for manual annotation.

Since every enum in api.proto has max < 128, all 58 enum field size
calculations now use constant arithmetic instead of calling varint
size functions.

Builds on #15424 which introduced the max_value optimization.
2026-04-05 18:16:14 -10:00
J. Nick Koston aa76b7bfc6 Merge remote-tracking branch 'upstream/dev' into api-proto-max-length 2026-04-05 18:06:45 -10:00
Jonathan Swoboda 7644f17cf6 [at581x] Fix codegen crash when using lambdas for frequency/time/power (#15468) 2026-04-06 00:05:04 -04:00
J. Nick Koston 1de94c1a84 [api] Add max_value proto option for constant-size varint codegen (#15424) 2026-04-05 18:02:06 -10:00
J. Nick Koston 10f08e0802 [esp8266] Add crash handler for post-mortem diagnostics (#15465) 2026-04-06 03:30:56 +00:00
J. Nick Koston 7a571493ff Merge remote-tracking branch 'origin/esp8266-crash-handler' into integration 2026-04-05 16:55:29 -10:00
Jonathan Swoboda aac74f4c94 [ags10] Fix wrong type passed to cg.templatable for set_zero_point mode (#15467) 2026-04-05 22:48:00 -04:00
J. Nick Koston efc449ccf8 Address Copilot review comments
- Fix crash_handler_has_data docstring: returns true for crash reset
  reason (exception/WDT), not dependent on RTC backtrace presence
- Always log numeric exccause in fallback branch for unexpected causes
2026-04-05 16:27:07 -10:00
Keith BurzinskiandClaude Opus 4.6 07f6be679f [esp32] Add signed app verification without hardware secure boot (#15357)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 21:20:48 -05:00
J. Nick Koston ea0ce710a8 [api] Split Noise handshake state_action_ to reduce stack pressure (#15464) 2026-04-05 13:55:06 -10:00
J. Nick Koston e209fb9ef3 Fix clang-tidy redundant-declaration for _irom0_text_end 2026-04-05 13:53:09 -10:00
J. Nick Koston 724d96dbfb Fix clang-tidy redundant-declaration for _irom0_text_end 2026-04-05 13:52:32 -10:00
J. Nick Koston 92dd7f18a0 Merge branch 'dev' into esp8266-crash-handler 2026-04-05 13:40:11 -10:00
J. Nick Koston f81e1c37da Merge remote-tracking branch 'upstream/esp8266-crash-handler' into integration 2026-04-05 13:39:46 -10:00
J. Nick Koston 2657bdc97a Reserve crash handler RTC region from preferences
Reduce preferences normal region from 96 to 78 words (words 32-109)
to formally reserve words 110-127 for the crash handler backtrace.
Preferences that don't fit in RTC fall back to flash storage, so
this has no functional impact for typical configurations.
2026-04-05 13:35:01 -10:00
J. Nick Koston 42f9b4225f Add RTC memory overlap comment in preferences.cpp 2026-04-05 13:33:27 -10:00
J. Nick Koston 82d178486b Address review feedback
- Add IRAM_ATTR to is_code_addr/recover_code_addr as safety net
  in case the compiler doesn't inline them
- Restore EXCVADDR logging for exception resets (faulting address
  is the key diagnostic for LoadProhibit/StoreProhibit)
- Add comment noting Xtensa stack pointer alignment assumption
2026-04-05 13:33:01 -10:00
J. Nick Koston 0614849896 Fix clang-tidy errors from CI
- Match Arduino core's declaration of _irom0_text_start/_end as
  void functions (mmu_iram.h declares them this way)
- Use C-style casts with NOLINT for int-to-ptr conversions in
  custom_crash_callback (clang-tidy performance-no-int-to-ptr)
2026-04-05 13:28:29 -10:00
J. Nick Koston 155657f1cc [mcp23xxx][pi4ioe5v6408] Disable loop when all pins are outputs (#15460) 2026-04-05 13:26:55 -10:00
J. Nick Koston 0f2d8656ad [esp32_ble] Skip dropped count memw when queue is empty (#15422) 2026-04-05 13:26:40 -10:00
J. Nick Koston 30d1230a17 [button] Downgrade press logging from DEBUG to VERBOSE (#15408) 2026-04-05 13:26:21 -10:00
J. Nick Koston 83a4edbea1 [select] [switch] Downgrade control path logging from DEBUG to VERBOSE (#15406) 2026-04-05 13:26:08 -10:00
J. Nick Koston f193bab60b [api] Add ListEntities benchmarks for sensor, binary_sensor, and light (#15427) 2026-04-05 13:25:50 -10:00
J. Nick Koston 1ecd45d14d Drop addr2line hint line
The ESPHome CLI already decodes addresses inline (shown as
WARNING Decoded lines). The hint was redundant and cost ~100
bytes of flash plus 220 bytes of stack for the format buffer.
2026-04-05 13:18:48 -10:00
Tomer27cz f01762ea44 [ci] move import to function (#15440) 2026-04-05 19:17:52 -04:00
Andrew Rankin f23843130e [lvgl] option to enable LVGL's built-in dark theme (#15389) 2026-04-06 09:07:42 +10:00
J. Nick Koston 4630c045bd Shorten Prohibited to Prohibit in exception cause names 2026-04-05 13:06:27 -10:00
J. Nick Koston 71649f6c1f Drop impossible exception causes and shorten strings
The LX106 (ESP8266) has no MMU, TLB, PIF, or privilege levels, so
exception causes 1, 5, 7, 8, 12-18, and 24-26 can never occur.
Remove them and shorten remaining cause names. Also drop Syscall,
Alloca, PCValue, Privileged which are unreachable on this core.
2026-04-05 13:05:40 -10:00