vl53l: fix sensor model mismatch — component supports VL53L4CD/VL53L4CX, not VL53L0X#613
Draft
vl53l: fix sensor model mismatch — component supports VL53L4CD/VL53L4CX, not VL53L0X#613
Conversation
2 tasks
…L4CD/VL53L4CX - Update README.md and example/README.md to correctly reference VL53L4CD/VL53L4CX and add explicit note that VL53L0X is not supported - Update doc/en/distance_sensors/vl53l.rst with correct sensor description - Fix vl53l.hpp class description to reference VL53L4CD/VL53L4CX - Add MODULE_TYPE_CD (0xAA) and MODULE_TYPE_CX (0x10) constants - Update get_model_info() to accept both VL53L4CD and VL53L4CX module types - Change model ID mismatch log level from error to warn (init proceeds anyway) - Fix stale VL53L0X register reference comment in init() Agent-Logs-Url: https://github.com/esp-cpp/espp/sessions/436039d8-973e-4dff-a1c0-2978dc50d395 Co-authored-by: finger563 <213467+finger563@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix model ID mismatch for VL53L0X sensor
vl53l: fix sensor model mismatch — component supports VL53L4CD/VL53L4CX, not VL53L0X
Apr 19, 2026
|
✅Static analysis result - no issues found! ✅ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
espp/vl53lcomponent implements the VL53L4CD/VL53L4CX driver (16-bit register addressing, model ID0xEB) but all documentation incorrectly identified the supported hardware as VL53L0X. Users with VL53L0X sensors (e.g., WHADDA WPSE337) got a misleading "Model ID mismatch" error because VL53L0X uses 8-bit register addressing and is fundamentally incompatible with this driver — the 16-bit register address0x010Fis misinterpreted, returning garbage values (0x0F,0x01).Documentation fixes
Driver fixes (
vl53l.hpp)MODULE_TYPE = 0xAAintoMODULE_TYPE_CD = 0xAA(VL53L4CD) andMODULE_TYPE_CX = 0x10(VL53L4CX), so both variants are accepted inget_model_info()logger_.error→logger_.warnsince initialization proceeds regardless