From 6a57882829fe12a0f0c26f4d70389a63197f4002 Mon Sep 17 00:00:00 2001 From: Alexey Kubrinsky Date: Sun, 2 Sep 2018 00:47:35 +0200 Subject: [PATCH] Revert "Fix ccs811 begin result check" --- sonoff/xsns_31_ccs811.ino | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sonoff/xsns_31_ccs811.ino b/sonoff/xsns_31_ccs811.ino index 8aba4d04f..482572cdb 100644 --- a/sonoff/xsns_31_ccs811.ino +++ b/sonoff/xsns_31_ccs811.ino @@ -47,12 +47,13 @@ void CCS811Update() // Perform every n second tcnt = 0; CCS811_ready = 0; if (!CCS811_type) { - if (ccs.begin(CCS811_ADDRESS)) { // ccs.begin returns true in case of success + sint8_t res = ccs.begin(CCS811_ADDRESS); + if (!res) { CCS811_type = 1; snprintf_P(log_data, sizeof(log_data), S_LOG_I2C_FOUND_AT, "CCS811", 0x5A); AddLog(LOG_LEVEL_DEBUG); } else { - //snprintf_P(log_data, sizeof(log_data), "CCS811 init failed"); + //snprintf_P(log_data, sizeof(log_data), "CCS811 init failed: %d",res); //AddLog(LOG_LEVEL_DEBUG); } } else {