Revert "Fix ccs811 begin result check"

This commit is contained in:
Alexey Kubrinsky 2018-09-02 00:47:35 +02:00 committed by GitHub
parent 52af61b278
commit 6a57882829
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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 {