adafruit / Adafruit_BME280_Library

Arduino Library for BME280 sensors
Other
336 stars 305 forks source link

Added missing BME280 features + example scenarios #9

Closed julien-lebot closed 8 years ago

julien-lebot commented 8 years ago

I've added setters for the missing registers along with some enumeration to set them easily. I've also modified the example project to demonstrate the scenarios found in the datasheet.

microbuilder commented 8 years ago

Thanks for the pull request ... I'll need to properly test it out, but I'll merge if everything looks good.

mozzbozz commented 8 years ago

The code seems to work for me... However, there are a few reasons why I think this pull request isn't ready for prime time yet. Some of them are just nitpicking (sorry :wink: ), some of them are improvement advices:

I've worked the last few days with your code, troubleshot the flaws mentioned above and I'm going to do a PR with the improved code. However, your work was really helpful, I could reuse lots of your code and even learned some new stuff (e.g. I didn't know it's possible to put a function into a struct (your get functions) - a really nice feature). Thanks! :+1:

--> This is my PR

julien-lebot commented 8 years ago

Yeah no problems, I wasn't sure what the conventions were so I went with what I'm used to. I agree the API was sub-par, I even ran into the issues you mentioned later on myself - I should have spent a bit more time on QA. Just out of curiosity, is there a contribution guide for Adafruit's projects ?

I'll close this PR, thanks for the peer-review.

mozzbozz commented 8 years ago

Just out of curiosity, is there a contribution guide for Adafruit's projects ?

I only found this (it will be the standard-text in the PR text box now, it wasn't there yet when you submitted your PR, though), but maybe there is more stuff at a different place.