fix(bmm150): Phase A wrapper fixes for silent failure mode - #312
Merged
Conversation
Correct delay_us units, I2C callback return codes, chip ID validation, and runtime bus error detection so missing sensors fail loudly instead of publishing -32768 forever.
Check intf_rslt after bmm150_init before set_op_mode overwrites it, revert update_interval to 30s in README and test YAML, and remove per-test .gitignore (root already ignores .esphome/).
intf_rslt only reflects the last transaction in read_trim_registers(). Set bus_error_ in reg_read/reg_write callbacks so partial init failures are caught before bad trim data is used.
E_DEV_NOT_FOUND remains a hard failure. E_COM_FAIL only warns so update() can re-run initialization after bus recovery. Unify mag-data reads on the bus_error_ latch.
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.
Summary
Test plan
Made with Cursor