Skip to content

Conversation

tyeth
Copy link
Member

@tyeth tyeth commented Aug 21, 2025

Adds the magnetic angle sensor.
Worth noting the device zeros on reset/init.

Not sure my angular calculation from the "scaled" value correctly gives 0-359 which I think is what's expected.
Also didn't have a great magnet for testing, but did see rotation, and returning to approximate expected angle

@tyeth tyeth requested a review from brentru August 22, 2025 18:08
@tyeth
Copy link
Member Author

tyeth commented Aug 22, 2025

Note to self - Do not merge without testing reinitialising the as5600

Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tyeth Requesting two changes

@tyeth
Copy link
Member Author

tyeth commented Aug 22, 2025

As mentioned in the MLX pull request, I believe (not verified 100%) the destructors are not being called, due to the delete *iter line being disabled:
https://github.com/adafruit/Adafruit_Wippersnapper_Arduino/blob/main/src/components/i2c/WipperSnapper_I2C.cpp#L1038
I only say that due to having the delete in there with an if check first plus set to nullptr, but it still crashed - now in actual fact that may have been due to testing reinitialisation too where the main adafruit_mlx driver didn't yet have the i2c_dev=nullptr fix applied that I later locally applied in testing.
I should verify if the destructors are being called, presumably by the erase_ later in the same code block of wipper_i2c.cpp

@brentru
Copy link
Member

brentru commented Aug 27, 2025

@tyeth MLX has been fixed and released, is this PR still blocking?

Copy link
Member

@brentru brentru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, feedback addressed

@brentru brentru merged commit 9b79afc into main Aug 28, 2025
45 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.

2 participants