Skip to content

applet.sensor.qmc5883p: initial implementation#1122

Open
i-infra wants to merge 7 commits intoGlasgowEmbedded:mainfrom
i-infra:ii/qmc5883p
Open

applet.sensor.qmc5883p: initial implementation#1122
i-infra wants to merge 7 commits intoGlasgowEmbedded:mainfrom
i-infra:ii/qmc5883p

Conversation

@i-infra
Copy link
Copy Markdown

@i-infra i-infra commented Mar 6, 2026

Initial implementation for the qmc5883p magnetometer sensor - i2c @ 0x2C.

This code is tested working with the GY-271 breakout ie) https://www.aliexpress.us/item/2251832421287528.html.

Shoutout @adafruit (referenced their libs)

Datasheet for part @ https://www.qstcorp.com/upload/pdf/202512/2C939E5AA0704285BC3BE71132B8629B.pdf

PS: sending sm love to the glasgow team <3

…883p magnetometer sensor (i2c @ 0x2C) - tested working with GY-271 breakout ie) https://www.aliexpress.us/item/2251832421287528.html. shoutout adafruit (referenced their libs)
@i-infra i-infra requested a review from whitequark as a code owner March 6, 2026 02:12
Copy link
Copy Markdown
Member

@whitequark whitequark left a comment

Choose a reason for hiding this comment

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

At a glance this looks great! The only issues I can see without closely looking through the functionality is ones that were already a problem in the codebase before you started working on your applet.

Please do the following in addition to inline comments:

  • Add yourself to CODEOWNERS for this applet
  • Add a documentation page at least for the CLI
  • Add types to the Interface class (if this is something you would normally use in your code)
  • Document the Interface class and add an API documentation section to the documentation page (I will merge the applet without this but it is preferred to have API docs for new applets like this one)

@whitequark
Copy link
Copy Markdown
Member

Regarding code formatting, there is a Ruff configuration and a pre-commit file that invokes it, this configuration is the one appropriate for Glasgow source code.

@whitequark whitequark added the waiting-on-author Status: Waiting on issue reporter or PR author label Mar 6, 2026
…, add docs, add types, switch to enums for parameters
@i-infra i-infra requested a review from whitequark March 6, 2026 02:41
Copy link
Copy Markdown
Member

@whitequark whitequark left a comment

Choose a reason for hiding this comment

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

I did a rough pass (not a final one), looks better. By the way, I'm not sure why but "requesting review" from me on GitHub doesn't seem like it sends me an email; leaving a comment is the best way to get my attention.

…, add stub for rst autogen, add qmc5883 to index
@i-infra
Copy link
Copy Markdown
Author

i-infra commented Mar 7, 2026

I think it's good to go? Need to figure out legacy vs appletv2 stuff eventually, but check it out when you get a sec! Suspect it's approaching mergable.

@whitequark
Copy link
Copy Markdown
Member

Need to figure out legacy vs appletv2 stuff eventually, but check it out when you get a sec! Suspect it's approaching mergable.

Oh I somehow missed that you were still using the legacy applet infrastructure. New legacy applets are a big "no", I've been trying to migrate all of them to the new infrastructure for months already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-on-author Status: Waiting on issue reporter or PR author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants