Zanduino / BME680

Arduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor
GNU General Public License v3.0
41 stars 10 forks source link

Add function "getOversampling()" to read the oversampling values from the BME680 #17

Closed SV-Zanshin closed 4 years ago

SV-Zanshin commented 4 years ago

Is your feature request related to a problem? Please describe.

I have had a request to add this function to the library, at the moment the library contains no means of reading the current settings.

Describe the solution you'd like Add the "getOversampling()" function to the library with the same parameters as the [setOversampling()](https://github.com/SV-Zanshin/BME680/wiki/setOversampling()) function.

Describe alternatives you've considered None, if the user wants to read the current settings.

Additional context None required

Zanshin Logo

SV-Zanshin commented 4 years ago

I think that the routine should be modified along the lines of the [setIIRFilter()](https://github.com/SV-Zanshin/BME680/wiki/setIIRFilter()) function. Right now the return value is a boolean for success or failure, but this can be changed to an unsigned integer returning the current setting. When called with no parameter for the setting, it will return the register contents.

While this is nominally not backwards compatible to the current implementation, it makes sense to change the functionality and documentation.

SV-Zanshin commented 4 years ago

Changed functionality of teh "setOversampling()" function and updated the documentation.