Skip to content

Adopt changes from the BME280 library #13

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

Merged
merged 3 commits into from
May 3, 2019
Merged

Conversation

jraber
Copy link
Contributor

@jraber jraber commented Apr 4, 2019

Adopt changes from the BME280 library to enable Normal mode, IIR Filters, & Overscan

I applied the changes that were applied to the BME280 library to the BMP280.

jraber added 2 commits April 3, 2019 21:38
Add Normal mode for continuous reading
This causes a change in behavior when var1 == 0.  Previously, the property
would return 0.  Now it returns _BMP280_PRESSURE_MIN_HPA.  The
new behavior is the same as in the Bosch C driver.

This also makes pylint happy by remove the 'return after else'
@caternuson caternuson requested a review from a team April 4, 2019 15:08
@jraber
Copy link
Contributor Author

jraber commented Apr 30, 2019

ping.

Is there something I can do to help get this reviewed?

This is basically just the same code that was already accepted in the BME280 library, minus the humidity property (since the BMP280 doesn't have that).

Ref: adafruit/Adafruit_CircuitPython_BME280#22

@ladyada
Copy link
Member

ladyada commented May 1, 2019

@siddacious wanna take a look at this PR & test it?

@siddacious
Copy link

Sure

@siddacious
Copy link

@ladyada I just checked and I don't have a BME280 but I'll get one ordered

@makermelissa
Copy link
Collaborator

@siddacious, this PR is for the BMP280.

@siddacious
Copy link

@makermelissa thanks for the catch. I also do not have one of those

@makermelissa
Copy link
Collaborator

I can take a look then. I have both.

@siddacious
Copy link

@makermelissa ok, sounds good

Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested both examples on SPI and I2C. Just one small change.

# OR create library object using our Bus SPI port
#spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
#bme_cs = digitalio.DigitalInOut(board.D10)
#bme280 = adafruit_bme280.Adafruit_BME280_SPI(spi, bme_cs)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was left as bme280. Just need to change it to:

bmp_cs = digitalio.DigitalInOut(board.D10)
bmp280 = adafruit_bmp280.Adafruit_BMP280_SPI(spi, bmp_cs)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Fixed that with commit b9e41db

@makermelissa makermelissa merged commit bccab54 into adafruit:master May 3, 2019
@makermelissa
Copy link
Collaborator

Looks good.

adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 3, 2019
@ladyada
Copy link
Member

ladyada commented May 21, 2019

hiya this broke trinket m0 and other non-express builds. do we need to use frozenset or can we use something else?
https://forums.adafruit.com/viewtopic.php?f=52&t=151982

@makermelissa
Copy link
Collaborator

I can test this tonight and see if I can figure how to get it working with the trinket.

@makermelissa
Copy link
Collaborator

Removing frozenset and using a normal list fixed the issue. I'll submit a PR.

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.

4 participants