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 skip_reset option to BMI270::begin* methods, preventing soft reset during init #4

Closed
wants to merge 1 commit into from

Conversation

disq
Copy link

@disq disq commented Jan 15, 2024

This PR adds skip_reset to the following methods:

int8_t beginI2C(uint8_t address = BMI2_I2C_PRIM_ADDR, TwoWire& wirePort = Wire, bool skip_reset = false);
int8_t beginSPI(uint8_t csPin, uint32_t clockFrequency = 100000, bool skip_reset = false);

Useful when waking up from sleep and the IMU has already initialized. Preventing the soft reset lets us read IMU regs to get activity data (such as step count) while we were asleep.

@sfe-SparkFro
Copy link
Collaborator

Hi there, thanks for your contribution!

Unfortunately, I don't think we'll accept this PR as it is, because it modifies the underlying BMI270 API from Bosch. We're reluctant to modify their API, because if they roll out an update that we want to merge, then it's very likely to lead to merge conflicts.

I do think this is a good feature though, so I would suggest creating a similar PR in the Bosch BMI270 repo. If they accept it and roll out a new release, then we can bring in those changes and update the Arduino library to match.

@disq
Copy link
Author

disq commented Jan 18, 2024

Opened boschsensortec/BMI270_SensorAPI#24 we'll see how it goes.

@sfe-SparkFro
Copy link
Collaborator

Great!

I think I'll close this PR for now. If and when Bosch adds that feature, then please follow up and we can add that feature here too.

Thanks again!

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