From 31cd61355553bda24b703f01875057887e020e44 Mon Sep 17 00:00:00 2001 From: Verkehrsrot Date: Wed, 31 Jul 2019 22:20:18 +0200 Subject: [PATCH] bugfix bmecycler --- src/bmesensor.cpp | 2 ++ src/main.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bmesensor.cpp b/src/bmesensor.cpp index deb8e45e..78298798 100644 --- a/src/bmesensor.cpp +++ b/src/bmesensor.cpp @@ -109,6 +109,8 @@ int bme_init(void) { finish: I2C_MUTEX_UNLOCK(); // release i2c bus access + if (rc) + bmecycler.attach(BMECYCLE, bmecycle); return rc; } // bme_init() diff --git a/src/main.cpp b/src/main.cpp index fb09f5b9..3674b6bb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -410,7 +410,6 @@ void setup() { // cyclic function interrupts sendcycler.attach(SENDCYCLE * 2, sendcycle); housekeeper.attach(HOMECYCLE, housekeeping); - bmecycler.attach(BMECYCLE, bmecycle); #if (TIME_SYNC_INTERVAL)