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

Abstract acceleration sensor and add support for SC7A20 chip used in P8 #1132

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

StarGate01
Copy link
Contributor

@StarGate01 StarGate01 commented May 10, 2022

This PR has been broken out of #1050, and depends on / includes #1128 .

  • Abstract the acceleration sensor driver to inherit from the new AccelerationSensor base class
  • Add driver for the SC7A20 chip, use FIFO buffer for smoothing, similar to BMA421: Use internal FIFO for smoothing #1145 .
  • The CMake configuration has been extended to support driver selection via DRIVER_ACC

@StarGate01
Copy link
Contributor Author

StarGate01 commented May 18, 2022

The simulator fails to build because the signature of the constructor Pinetime::System::SystemTask::SystemTask was changed, it now expects a Pinetime::Drivers::AccelerationSensor instead of Pinetime::Drivers::Bma421.

Should I open a PR in InfiniSim?

@Riksu9000
Copy link
Contributor

Eventually it will need to be fixed in InfiniSim, however it might be a bit early to do it now.

The fifo changes that affect the PineTime should be one PR, so the other is focused only on the new driver and reviews will be easier.

@StarGate01
Copy link
Contributor Author

Ok, I moved the FIFO changes for the BMA421 to #1145 .

The AccelerationSensor base class provides a unified interface
to access both the BMA421 as well as the SC7A20 chip.
The FIFO buffer is used as well
The DRIVER_ACC configuration variable can be used to select the
acceleration sensor driver to be used.
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