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

Refactor I2C_Driver Initialization #232

Merged
merged 1 commit into from
Mar 14, 2022
Merged

Refactor I2C_Driver Initialization #232

merged 1 commit into from
Mar 14, 2022

Conversation

brentru
Copy link
Member

@brentru brentru commented Mar 11, 2022

  • Switch all drivers' initialization to match standard Adafruit library initialization procedure where new sensor driver allocates/initializes the driver base class and begin initializes the sensor and begins I2C.
    • Previously, this was completed by the constructor for each driver which is great in Python but does not follow the C++ convention we use across Adafruit_Sensor libraries.
    • The guide for adding an i2c sensor will minimally need to be updated once this is merged.
  • begin() must be implemented on all driver sub-classes

@brentru brentru requested a review from ladyada March 11, 2022 21:27
@brentru brentru merged commit b97f0a5 into adafruit:main Mar 14, 2022
@brentru brentru deleted the refactor-to-begin-instead branch March 14, 2022 14:35
@brentru
Copy link
Member Author

brentru commented Mar 14, 2022

Learn Guide page updated to match new implementation.

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