1
0
mirror of https://github.com/cmur2/python-bme680.git synced 2024-12-22 12:54:29 +01:00
Commit Graph

31 Commits

Author SHA1 Message Date
cn
efce546001 Fix compensation tests for fixed ambient_temperature on first gas reading 2020-08-09 02:15:20 +02:00
cn
cd32ec320d Merge upstream 2020-08-09 01:44:29 +02:00
Phil Howard
5806466739 Fix for test in py3 2020-03-20 15:44:06 +00:00
Phil Howard
90fabf53fa Expand test coverage and improve tests 2020-03-20 15:38:22 +00:00
cn
db4626f370 Use fixed ambient_temperature on first gas reading, it's nearly irrelevant
Note: on subsequent gas measurements the last temperature instead of 25 degree C will be used.
Nearly irrelevant because this happens to return value of _calc_heater_resistance(200):

ambient_temperature = 30 -> int(84.9119287004)
ambient_temperature = 25 -> int(84.9119068473)
ambient_temperature = 20 -> int(84.9118849941)
ambient_temperature = 10 -> int(84.9118412877)
2018-12-24 23:18:33 +01:00
Giampiero Baggiani
e827e5d622 added check on constants.__dict__ for micropython support (#18)
* added check on constants.__dict__ for micropython support
2018-12-10 09:55:07 +00:00
cn
6442510ab0 Use floating point precision for measurement compensations to yield sensor resolution
According to the datasheet the resolution delivered by the sensor is better
than 1 degree Celsius, 1 Pascal, 1 percent relative humidity etc. The user
should have the possibility to get floating point precision and figure out
what the measurement accuracy allows given their settings.
2018-12-07 11:39:50 +01:00
cn
db02dd0d65 Increase poll period by x5 to allow successful measurement on max oversampling 2018-12-07 11:39:50 +01:00
cn
c85e3de250 Remove redundant tweaking of measurement settings after soft reset, let user choose once 2018-12-07 11:39:50 +01:00
cn
405867a4aa Use standard units for pressure measures, let user choose conversion 2018-12-07 11:39:45 +01:00
Phil Howard
e43b362a33 Fixed Travis badge URL 2018-09-03 11:39:10 +01:00
Phil Howard
df382a50aa Updated badges 2018-09-02 11:31:16 +01:00
Phil Howard
6374bc4241 Test suites and code QA fixes 2018-09-02 11:26:04 +01:00
Phil Howard
50902ac08e Prep for v1.0.5 2018-06-01 17:15:10 +01:00
Phil Howard
4ae50e2f2c Fixed bug in set_temp_offset 2018-06-01 16:10:08 +01:00
Phil Howard
7e08c2d749 Fixed packaging errors 2018-06-01 16:04:37 +01:00
Lars Lühr
fed191e40e use math.copysign for temp offset calculation 2018-05-31 08:21:14 +00:00
Lars Lühr
ae004aa62b accept float values in set_temp_offset 2018-05-28 21:38:19 +00:00
Lars Lühr
1c9ba41306 added set_temp_offset function and example 2018-05-28 21:18:20 +00:00
Phil Howard
da6ae97f1f Prep for v1.0.4 2017-12-04 10:37:52 +00:00
lowflyerUK
02407e1d01 Updated mask operation in constants.py to correct gas resistance 2017-12-03 21:49:32 +00:00
Phil Howard
888d8b312a Convert negative gas resistance readings to unsigned int32 2017-12-01 14:08:40 +00:00
Phil Howard
288daed781 Version 1.0.3 prep 2017-11-23 11:25:34 +00:00
Geoff Lee
26a28bfde7 Fix reassignment of variable in pressure calculation algo 2017-11-21 21:16:27 +00:00
Dave Arter
3e4bf56802 Fix Python 3 TypeError crashes by using floor division explicitly
The / operator in Python 3 returns a float, which was causing TypeErrors
when being passed to the << or >> operators.
2017-11-19 17:10:27 +00:00
Phil Howard
d9970151cd Fixes from upstream BME680_driver 3.5.3 2017-11-17 11:29:48 +00:00
Phil Howard
7bc7ef693b Prep for version 1.0.2 2017-10-19 12:21:16 +01:00
Dave Arter
35b26a1529 Ensure set_gas_heater_temperature calls _set_regs with int
When running the `examples/read-all.py` script I was seeing a crash because
the value passed to `write_i2c_block_data` wasn't being converted to an int:

```
  File "/home/pi/tmp/bme680/library/bme680/__init__.py", line 281, in _set_regs
    self._i2c.write_i2c_block_data(self.i2c_addr, register, value)
TypeError: Third argument must be a list of at least one, but not more than 32 integers
```

This commit ensures `set_gas_heater_temperature` converts the temperature to an int
before it's passed to `self._set_regs`.
2017-10-18 13:10:17 +01:00
Phil Howard
9b18ecf446 Fixed Manifest 2017-10-17 16:02:29 +01:00
Phil Howard
7f2dbdf48e Tweaked 2017-10-17 15:27:30 +01:00
Phil Howard
16853dc4f2 Added packaging, dropped copy of C code 2017-10-17 15:09:19 +01:00