-
由 George Mathieson 提交于
* Create bme680 device binding project from the template * Add BME680 sensor with temperature, pressure and humidity functionality * Refactor the Bme680 binding into the existing binding * Rename registers to match those in the Bmx280 binding * Rename Register to Bmx280Register and create a Bme680Register The BMP280 and BME280 use the same registers, so Bmx280Register has been used as the name. As there is only one binding using the registers for the Bme680, this has been named Bme680Register. * Add a Bmxx80Register for registers shared amongst the Bmxx80 family * Move registers into their own folder Similar to how the Mcp25xxx binding is * Rename Bme680 calibration data to match the Bmx280 naming * Make ReadFromDevice() virtual and rename bmp280 to bmxBase * Add calibration data for the Bme680 * Create separate calibration data for Bmx280 and Bme680 bindings * Order csproj includes * Create a Bmxx80 base class containing common functionality in this device family * Change BmxBase to Bmx280Base Which contains common functionality for the Bmx280 family of devices. * Update the existing BME280 and BMP280 devices to work with Bmx280Base * Calibration data only needs functionality from the Bmxx80Base class * Create an initial Bme680 device binding * Rename the comment and tidy the spacing * Move calibration data into its own folder * Add relative humidity, pressure and temperature functionality for the BME680 * Remove the original Bme680 binding * Rename Bmx280 to Bmxx80 * Update project reference for existing examples * Add example for the BME680 * Update readme to include the BME680 sensor * Move sample project into the root of samples * Move all the properties for calibration data into the base class * Update power mode and device ID Let the device set it's ID, and power modes are different between the BME680 and BMX280 devices. * Update examples to use specific power modes * Add using for power mode * Device ID is only used in the constructor * Add licence * Make the base classes abstract * Add a brief description to the exception XML docs * Change internal to protected so that a class that is derived from that class can use it * Change to protected internal Calibration Data uses these methods but does not inherit from the device It now makes more sense to have the base calibration as a public abstract class. * These base registers are more useful if they're public * Use the new switch C# 8 feature * Update comment with a link to the datasheet * Validate that the given power mode matches the expected for the sensor * Remove properties in favour of just calling the Read methods * Merge branch 'master' into bme680 * Merge BME280 - Humidity Support #435 * Add link to datasheet * Use latest lang version * Bring the sample project changes for Bme280.sample over * Fix loss of precision during ReadPressureAsync * Update the power mode comments for Bmx280 to match the docs * Update Bme680.sample to use new SpiDevice.Create * Remove extra comment delimiter * Update to use new i2c namespace * Update example to use new i2c namespace * Remove unused usings * Add missing param comment * Update categorized device listing (#554) for BME680 * Implement the Dispose pattern * Set TemperatureFine to int.MinValue for the Bmx280Base * Refactor SetPowerMode to combine both bitwise operations * Cast as StandbyTime * Cast as Bme680PowerMode * Make the BME680 methods Async and return a Task Done for consistency with other sensors in this family * await ReadTemperatureAsync for humidity * Change Main() to async Task * Remove the int.MinValue check from Bmx280Base pressure and Bme280 humidity * Read temperature before compensating pressure for Bme680
d32ad7a6