Skip to content

fix(config_httpd): gate temp-sensor code behind CONFIG_SOC_TEMP_SENSOR_SUPPORTED - #50

Merged
fudio101 merged 3 commits into
mainfrom
chore/temp-sensor-gate
Aug 18, 2026
Merged

fix(config_httpd): gate temp-sensor code behind CONFIG_SOC_TEMP_SENSOR_SUPPORTED#50
fudio101 merged 3 commits into
mainfrom
chore/temp-sensor-gate

Conversation

@fudio101

Copy link
Copy Markdown
Collaborator

Summary

Closes #29

Test plan

  • idf.py build not runnable in this sandbox (no ESP-IDF installed) — needs a real build,
    ideally on both a temp-sensor-capable target (e.g. esp32s3) and one without support, to confirm
    both compile and handler_monitor's JSON output is correct in both cases.

🤖 Generated with Claude Code

liestrela and others added 3 commits August 18, 2026 23:57
…R_SUPPORTED

esp_driver_tsens was an unconditional REQUIRES and the temp-sensor init/
read/deinit calls were unconditional too, breaking the build on SoC
variants without a temperature sensor. Gate both behind
CONFIG_SOC_TEMP_SENSOR_SUPPORTED; handler_monitor still always returns a
temp_c JSON field (null when unsupported) so the REST API shape is
unchanged.

Cherry-picked from liestrela/microlink@1649d987.

Closes #29

Co-authored-by: Adrian.Nguyen-Qualgo <nguyen.ndt@qualgo.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Row 5 (#24, PR #49) was missed when marking rows done in the prior
batch. Row 10 (#29) is this PR.

Co-authored-by: Adrian.Nguyen-Qualgo <nguyen.ndt@qualgo.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
Kconfig-gating a REQUIRES entry silently no-ops in this build (documented
a few lines above for esp_driver_uart/esp_driver_gpio, same root cause):
REQUIRES is resolved before Kconfig is available, so
CONFIG_SOC_TEMP_SENSOR_SUPPORTED evaluates false regardless of target and
esp_driver_tsens never gets linked in -- while ml_config_httpd.c's
post-Kconfig #if CONFIG_SOC_TEMP_SENSOR_SUPPORTED is true on esp32s3, so
it tries to include a header from a component that was never required.
CI caught this: "driver/temperature_sensor.h: No such file or
directory" on every v6.0.1 build.

The CONFIG_SOC_TEMP_SENSOR_SUPPORTED check in ml_config_httpd.c already
correctly gates the feature at compile time; only the REQUIRES gating
attempt was wrong.

Co-authored-by: Adrian.Nguyen-Qualgo <nguyen.ndt@qualgo.net>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
@fudio101
fudio101 merged commit 8e49f6b into main Aug 18, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gate temp-sensor feature behind CONFIG_SOC_TEMP_SENSOR_SUPPORTED (mined from liestrela/microlink)

3 participants