fix: Correct broken method calls in lis2mdl and wsen-pads examples.#216
fix: Correct broken method calls in lis2mdl and wsen-pads examples.#216
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Fixes two example scripts that were calling non-existent driver methods, aligning them with the actual low-level register-read helpers implemented by each driver (as detected by the example validation tests added in #213).
Changes:
- Update
lib/lis2mdl/examples/magnet_test.pyto usedev._read_reg()instead of the non-existentdev.read_reg(). - Update
lib/wsen-pads/examples/test.pyto usesensor._read_reg()instead of the non-existentsensor._read_u8().
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
lib/lis2mdl/examples/magnet_test.py |
Replaces invalid register-read calls with the driver’s existing _read_reg() helper so the example runs and passes validation. |
lib/wsen-pads/examples/test.py |
Switches to _read_reg() for register dumps/default checks to match the WSEN-PADS driver API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🎉 This PR is included in version 0.0.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Closes #214
Summary
Fix 2 examples that call methods not existing in their drivers, detected by the example validation test suite (#213).
Changes
lib/lis2mdl/examples/magnet_test.pymag.read_reg()(28 occurrences)mag._read_reg()(actual private method)lib/wsen-pads/examples/test.pysensor._read_u8()(5 occurrences)sensor._read_reg()(actual private method)Verification