Commit Graph

22359 Commits

Author SHA1 Message Date
J. Nick Koston
a6579dc2f1 Pass c_str() and size() directly to date/time/datetime setters
These setters have (const char*, size_t) overloads that do the
actual work. Skip the std::string& overload indirection.
2026-02-11 18:10:36 -06:00
J. Nick Koston
f4493100e3 Merge branch 'web_server_use_arg_api' into integration 2026-02-11 18:09:35 -06:00
J. Nick Koston
920f84fa1d Eliminate double lookups in parse_string_param_ and date/time/datetime handlers
- parse_string_param_: use arg() and check empty instead of hasArg+arg
- date/time/datetime: inline arg() call to avoid redundant hasArg+parse_string_param_ triple lookup
2026-02-11 18:08:23 -06:00
J. Nick Koston
d73bd9997e Merge branch 'web_server_use_arg_api' into integration 2026-02-11 18:03:52 -06:00
J. Nick Koston
c2bb55ff5d Add NOLINT for length() > 0 cross-platform check
Arduino String has isEmpty() not empty(). Using length() > 0
works on both std::string and Arduino String.
2026-02-11 18:03:32 -06:00
J. Nick Koston
c6b51d3434 Fix clang-tidy: disambiguate overloaded climate setters
ClimateCall has overloaded set_target_temperature*(float) and
set_target_temperature*(optional<float>), so the compiler can't
infer NumT. Use static_cast to select the float overload.
2026-02-11 18:02:56 -06:00
J. Nick Koston
598978de45 Fix clang-tidy: disambiguate overloaded climate setters
ClimateCall has overloaded set_target_temperature*(float) and
set_target_temperature*(optional<float>), so the compiler can't
infer NumT. Use static_cast to select the float overload.
2026-02-11 18:02:23 -06:00
J. Nick Koston
c727819b23 Merge branch 'web_server_use_arg_api' into integration 2026-02-11 17:58:09 -06:00
J. Nick Koston
f638b65f1e Fix Arduino build: use length() instead of empty()
Arduino String has isEmpty() not empty(). Use length() > 0
which works on both std::string and Arduino String.
2026-02-11 17:57:49 -06:00
J. Nick Koston
0a99abd63f Fix Arduino build: use length() instead of empty()
Arduino String has isEmpty() not empty(). Use length() > 0
which works on both std::string and Arduino String.
2026-02-11 17:57:39 -06:00
J. Nick Koston
ca92601b5a Merge branch 'web_server_use_arg_api' into integration 2026-02-11 17:56:35 -06:00
J. Nick Koston
f92725f76e Eliminate double query lookups and unify numeric parse helpers
- Mark find_query_value_ as const
- Remove redundant hasArg() guards where parse_number() already
  handles empty strings (returns nullopt)
- Use !empty() instead of hasArg() for parse_bool_param_
- Merge parse_float_param_ and parse_int_param_ into single
  parse_num_param_ template
- Combine missing/empty checks for IR data parameter
2026-02-11 17:54:56 -06:00
J. Nick Koston
8b1150f21f Merge remote-tracking branch 'upstream/dev' into integration 2026-02-11 17:43:26 -06:00
J. Nick Koston
2a89088bc3 Merge branch 'dev' into web_server_use_arg_api 2026-02-11 17:43:10 -06:00
J. Nick Koston
ae42bfa404 [web_server_idf] Remove std::string temporaries from multipart header parsing (#13940) 2026-02-11 17:42:33 -06:00
J. Nick Koston
fecb145a71 [web_server_idf] Revert multipart upload buffer back to heap to fix httpd stack overflow (#13941) 2026-02-11 17:42:18 -06:00
J. Nick Koston
ffd778356b Merge branch 'web_server_use_arg_api' into integration 2026-02-11 17:37:24 -06:00
J. Nick Koston
db831ebee0 Fix clang-tidy: use const auto& for arg() return value
On Arduino, arg() returns const String&, so auto copies unnecessarily.
const auto& binds to the reference on Arduino and extends the temporary
lifetime on IDF.
2026-02-11 17:37:09 -06:00
J. Nick Koston
36e970dd8c Merge branch 'web_server_use_arg_api' into integration 2026-02-11 17:36:19 -06:00
J. Nick Koston
4f3c95ced2 [web_server] Switch from getParam to arg API to eliminate heap allocations
Switch all web_server callers from getParam()/hasParam() to arg()/hasArg().
Both APIs exist on Arduino ESPAsyncWebServer and our IDF implementation.

On the IDF side, getParam() allocated a new AsyncWebParameter on the heap
for every successful lookup, cached it in a vector, and required cleanup
in the destructor. No caller ever held the pointer or called getParam
twice with the same name - every use was just getParam("x")->value()
immediately.

Rewrite IDF arg()/hasArg() to call query_key_value() directly, bypassing
getParam entirely. The linker strips the now-unreferenced getParam,
AsyncWebParameter, and cache machinery.

Saves ~348 bytes flash on ESP32-IDF, ~272 bytes on ESP8266 Arduino.
2026-02-11 17:33:11 -06:00
J. Nick Koston
1401e55251 Revert "Revert "[web_server_idf] Remove std::string temporaries from multipart header parsing""
This reverts commit c03e38d688.
2026-02-11 17:04:34 -06:00
J. Nick Koston
464fcb7480 Merge branch 'revert_stack_buffer_multipart' into integration 2026-02-11 17:04:22 -06:00
J. Nick Koston
dbe8e39aa9 [web_server_idf] Move multipart upload buffer back to heap to fix httpd stack overflow
The 1460-byte MULTIPART_CHUNK_SIZE buffer was moved from heap to stack
in #13549, but the httpd task stack is only ~4096-5632 bytes. This
causes a stack overflow crash when processing OTA uploads, especially
on configs with BLE components that add additional stack pressure.

Move it back to heap since this buffer is only used during OTA uploads
(not a hot path), so heap fragmentation is not a concern here.

Fixes stack overflow: "A stack overflow in task httpd has been detected"
2026-02-11 17:03:07 -06:00
J. Nick Koston
c03e38d688 Revert "[web_server_idf] Remove std::string temporaries from multipart header parsing"
This reverts commit f6bb54486d.
2026-02-11 16:49:51 -06:00
J. Nick Koston
a32c038f4b Merge branch 'web_server_idf_multipart_string_removal' into integration 2026-02-11 16:46:31 -06:00
J. Nick Koston
f6bb54486d [web_server_idf] Remove std::string temporaries from multipart header parsing
Refactor multipart utility functions to work with const char* + length
instead of std::string to eliminate temporary heap allocations during
header parsing. The original implementations used std::string for
convenience when the OTA multipart support was first added, but these
can be avoided since the multipart parser already provides raw pointers
and lengths in its callbacks.

- extract_header_param: takes (const char*, size_t, const char*, std::string&)
  instead of (const std::string&, const std::string&) -> std::string.
  Assigns directly to destination, avoiding intermediate string construction.
- str_startswith_case_insensitive: takes (const char*, size_t, const char*)
  instead of (const std::string&, const std::string&)
- str_trim: takes (const char*, size_t, std::string&) instead of
  (const std::string&) -> std::string
- Rename stristr to strcasestr_n with explicit haystack length parameter
  to make the relationship to POSIX strcasestr clear and fix a latent
  buffer over-read risk (stristr relied on null-termination which the
  multipart parser does not guarantee for its callback data)
- process_header_ no longer creates a std::string copy of the raw
  parser buffer before calling utility functions

Saves ~350 bytes of flash.
2026-02-11 16:38:26 -06:00
J. Nick Koston
8ef99d3f53 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-11 16:09:41 -06:00
J. Nick Koston
e12ed08487 [wifi] Add CompactString to reduce WiFi scan heap fragmentation (#13472)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-11 21:24:24 +00:00
tomaszduda23
374cbf4452 [nrf52,zigbee] count sleep time of zigbee thread (#13933)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-02-11 21:21:10 +00:00
dependabot[bot]
7287a43f2a Bump docker/build-push-action from 6.18.0 to 6.19.1 in /.github/actions/build-image (#13937)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-11 15:12:05 -06:00
J. Nick Koston
19b0d38a43 Merge branch 'compact_string_wifi' into integration 2026-02-11 14:57:38 -06:00
J. Nick Koston
340156945f remove now unused 2026-02-11 14:57:17 -06:00
J. Nick Koston
a7c28fb68a Merge branch 'compact_string_wifi' into integration 2026-02-11 14:53:45 -06:00
J. Nick Koston
ee0f3a8548 fix pre-existing bug 2026-02-11 14:52:06 -06:00
J. Nick Koston
6a5015b2df debloat 2026-02-11 14:43:24 -06:00
J. Nick Koston
322fe205ab debloat 2026-02-11 14:40:05 -06:00
J. Nick Koston
f8115e9b18 Revert "reduce blast"
This reverts commit c1d53d9bad.
2026-02-11 14:39:54 -06:00
J. Nick Koston
0113575e4c reduce some of the StringRef bloat 2026-02-11 14:33:29 -06:00
J. Nick Koston
c1d53d9bad reduce blast 2026-02-11 14:02:10 -06:00
J. Nick Koston
483b7693e1 [api] Fix debug asserts in production code, encode_bool bug, and reduce flash overhead (#13936)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-02-11 13:57:08 -06:00
J. Nick Koston
18a6e43db8 avoid some conversion overhead 2026-02-11 13:51:49 -06:00
J. Nick Koston
2506831445 contain complexity into wifi 2026-02-11 13:34:18 -06:00
J. Nick Koston
90209e73c0 Merge branch 'dev' into compact_string_wifi 2026-02-11 13:20:38 -06:00
J. Nick Koston
64a98599a6 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-11 12:22:26 -06:00
J. Nick Koston
fc7e9c8a0c add reverse operators 2026-02-11 12:20:36 -06:00
J. Nick Koston
c9c125aa8d [socket] Devirtualize Socket::ready() and implement working ready() for LWIP raw TCP (#13913)
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-02-11 17:54:58 +00:00
schrob
8d62a6a88a [openthread] Fix warning on old C89 implicit field zero init (#13935) 2026-02-11 11:54:31 -06:00
J. Nick Koston
5d4fcaaf34 Merge remote-tracking branch 'upstream/dev' into integration 2026-02-11 11:42:01 -06:00
J. Nick Koston
0ec02d4886 [preferences] Replace per-element erase with clear() in sync() (#13934) 2026-02-11 11:41:53 -06:00
Nate Clark
1411868a0b [mqtt.cover] Add option to publish states as JSON payload (#12639)
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-11 11:40:27 -06:00