From 0f882940d29febef2f7d17be4c8ef7d7b9ec34fd Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 25 Sep 2019 16:04:35 +0200 Subject: BME680: Add .configure helper function --- include/driver/bme680.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/driver') diff --git a/include/driver/bme680.h b/include/driver/bme680.h index a054afd..acf6059 100644 --- a/include/driver/bme680.h +++ b/include/driver/bme680.h @@ -451,6 +451,15 @@ class BME680 { */ int8_t getSensorSettings(uint16_t desired_settings); + inline void configure(uint8_t os_hum, uint8_t os_pres, uint8_t os_temp, uint8_t run_gas, uint16_t heatr_dur, uint16_t heatr_temp) { + tph_sett.os_hum = os_hum; + tph_sett.os_pres = os_pres; + tph_sett.os_temp = os_temp; + gas_sett.run_gas = run_gas; + gas_sett.heatr_dur = heatr_dur; + gas_sett.heatr_temp = heatr_temp; + } + inline void setHumidityOversampling(uint8_t os) { tph_sett.os_hum = os; } -- cgit v1.2.3