mirror of https://github.com/arendst/Tasmota.git
Fix reset BMP sensors
Fix reset BMP sensors when executing command ``SaveData`` and define USE_DEEPSLEEP enabled (#9300)
This commit is contained in:
parent
9aa18c23f0
commit
26e041ab6e
|
@ -59,6 +59,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
|
|||
|
||||
- Fix energy total counters (#9263, #9266)
|
||||
- Fix crash in ``ZbRestore``
|
||||
- Fix reset BMP sensors when executing command ``SaveData`` and define USE_DEEPSLEEP enabled (#9300)
|
||||
- Add new shutter modes (#9244)
|
||||
- Add ``#define USE_MQTT_AWS_IOT_LIGHT`` for password based AWS IoT authentication
|
||||
- Add Zigbee auto-config when pairing
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
- Fix energy total counters (#9263, #9266)
|
||||
- Fix crash in ``ZbRestore``
|
||||
- Fix reset BMP sensors when executing command ``SaveData`` and define USE_DEEPSLEEP enabled (#9300)
|
||||
- Add new shutter modes (#9244)
|
||||
- Add ``#define USE_MQTT_AWS_IOT_LIGHT`` for password based AWS IoT authentication
|
||||
- Add Zigbee auto-config when pairing
|
||||
|
|
|
@ -613,15 +613,17 @@ void BmpShow(bool json)
|
|||
|
||||
void BMP_EnterSleep(void)
|
||||
{
|
||||
for (uint32_t bmp_idx = 0; bmp_idx < bmp_count; bmp_idx++) {
|
||||
switch (bmp_sensors[bmp_idx].bmp_type) {
|
||||
case BMP180_CHIPID:
|
||||
case BMP280_CHIPID:
|
||||
case BME280_CHIPID:
|
||||
I2cWrite8(bmp_sensors[bmp_idx].bmp_address, BMP_REGISTER_RESET, BMP_CMND_RESET);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (DeepSleepEnabled()) {
|
||||
for (uint32_t bmp_idx = 0; bmp_idx < bmp_count; bmp_idx++) {
|
||||
switch (bmp_sensors[bmp_idx].bmp_type) {
|
||||
case BMP180_CHIPID:
|
||||
case BMP280_CHIPID:
|
||||
case BME280_CHIPID:
|
||||
I2cWrite8(bmp_sensors[bmp_idx].bmp_address, BMP_REGISTER_RESET, BMP_CMND_RESET);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue