Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LIS3DH and I2C support to LIS2DW #6715

Merged
merged 4 commits into from
Nov 13, 2024

Conversation

Wulfsta
Copy link
Contributor

@Wulfsta Wulfsta commented Oct 22, 2024

This adds the LIS3DH accelerometer, and brings support for I2C to the LIS2DW. This branch also contains a documentation commit for these changes, a commit allowing the hardware I2C speed on atsamd chips to achieve fast-mode, and an addition to the sample configuration for the Duet3D 1LC. I am personally only able to test the LIS3DH over I2C.

Actions required:

  • LIS2DW over SPI regression testing
  • LIS2DW over I2C tests
  • LIS3DH over SPI tests
  • LIS3DH over I2C tests

Previous PRs related to this functionality: #6638 #6477

Tagging @KevinOConnor for possible LIS2DW regression testing, @dmbutyugin for possible LIS3DH SPI testing, and @eamaclean for the atsamd change.

@Wulfsta Wulfsta force-pushed the lis3dh-main branch 4 times, most recently from b959ae9 to c330d44 Compare October 22, 2024 04:38
Copy link
Collaborator

@KevinOConnor KevinOConnor left a comment

Choose a reason for hiding this comment

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

Thanks. In general it seems useful. I have some comments - see below.

I don't own a lis2dw sensor, so I can't help with testing.

Note that @nefelim4ag is working on i2c error handling in PR #6689, and I think this PR should come after that work.

Cheers,
-Kevin

docs/Config_Reference.md Outdated Show resolved Hide resolved
klippy/extras/lis2dw.py Outdated Show resolved Hide resolved
klippy/extras/lis2dw.py Outdated Show resolved Hide resolved
klippy/extras/lis3dh.py Show resolved Hide resolved
src/Kconfig Outdated Show resolved Hide resolved
src/atsamd/i2c.c Outdated Show resolved Hide resolved
src/sensor_lis2dw.c Outdated Show resolved Hide resolved
@Wulfsta Wulfsta force-pushed the lis3dh-main branch 2 times, most recently from c0cc837 to 6e75cba Compare October 22, 2024 23:01
Copy link
Collaborator

@KevinOConnor KevinOConnor left a comment

Choose a reason for hiding this comment

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

Thanks. Looks fine to me. As before, I think this should wait until after #6689.

-Kevin

src/sensor_lis2dw.c Outdated Show resolved Hide resolved
@Wulfsta
Copy link
Contributor Author

Wulfsta commented Oct 23, 2024

As before, I think this should wait until after #6689.

I’ll await for that change to get merged before refactoring and reaching out to the community for testers.

@KevinOConnor
Copy link
Collaborator

FYI, #6689 was merged.

-Kevin

@Wulfsta
Copy link
Contributor Author

Wulfsta commented Oct 27, 2024

This should be ready to request testers. I am not too worried about testing the lis2dw over I2C, as long as the other three possibilities get tested.

@Wulfsta Wulfsta closed this Oct 29, 2024
@Wulfsta
Copy link
Contributor Author

Wulfsta commented Oct 29, 2024

Whoops, was scrolling and closed by accident.

@Wulfsta Wulfsta reopened this Oct 29, 2024
@Wulfsta
Copy link
Contributor Author

Wulfsta commented Nov 7, 2024

Thanks to @dmbutyugin, the LIS3DH has been confirmed to work over SPI! Once I have a regression tester for the LIS2DW over SPI, I believe all branches would be covered by manual tests, and this would be safe to merge.

@Wulfsta
Copy link
Contributor Author

Wulfsta commented Nov 12, 2024

Thanks to @Kcdc3d, the LIS2DW has been tested over SPI!

@KevinOConnor this should be safe to merge.

@KevinOConnor KevinOConnor merged commit 2af8d3f into Klipper3d:master Nov 13, 2024
1 check passed
@KevinOConnor
Copy link
Collaborator

Thanks.

-Kevin

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