hts221: Add reboot() method for memory reload.#146
Merged
nedseb merged 2 commits intofix/standardize-resetfrom Mar 15, 2026
Merged
hts221: Add reboot() method for memory reload.#146nedseb merged 2 commits intofix/standardize-resetfrom
nedseb merged 2 commits intofix/standardize-resetfrom
Conversation
3 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a reboot() API to the HTS221 driver and extends the HTS221 YAML scenario suite to validate the reboot behavior in mock mode.
Changes:
- Implement
HTS221.reboot()by setting the CTRL_REG2 BOOT bit and re-reading temperature/humidity calibration. - Add mock-mode scenario tests covering reboot invocation and BOOT-bit write logging.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
lib/hts221/hts221/device.py |
Adds a reboot() method that triggers BOOT and reloads calibration values. |
tests/scenarios/hts221.yaml |
Adds mock scenario coverage for reboot() and verifying a BOOT-bit register write. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
3 tasks
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.
Closes #144
Sub-PR of #143
Summary
Add
reboot()method to the HTS221 driver. Sets the BOOT bit in CTRL_REG2 to reload calibration data from non-volatile memory, waits 15ms, then re-reads temperature and humidity calibration registers.Follows the same pattern as WSEN-HIDS and LIS2MDL
reboot().Test plan
2 new mock tests: