diff --git a/tests/driver_ccs811/main.c b/tests/driver_ccs811/main.c index f3e7ddb43c..6b666cb857 100644 --- a/tests/driver_ccs811/main.c +++ b/tests/driver_ccs811/main.c @@ -58,7 +58,7 @@ int main(void) } /* read the data and print them on success */ - if (ccs811_read_iaq(&sensor, &tvoc, &eco2, 0, 0) != CCS811_OK) { + if (ccs811_read_iaq(&sensor, &tvoc, &eco2, 0, 0) == CCS811_OK) { printf("TVOC [ppb]: %d\neCO2 [ppm]: %d\n", tvoc, eco2); puts("+-------------------------------------+"); } diff --git a/tests/driver_ccs811_full/main.c b/tests/driver_ccs811_full/main.c index 78e98e8ce5..85e202ca7d 100644 --- a/tests/driver_ccs811_full/main.c +++ b/tests/driver_ccs811_full/main.c @@ -89,7 +89,7 @@ int main(void) msg_receive(&msg); /* read the data */ - if (ccs811_read_iaq(&sensor, &tvoc, &eco2, 0, 0) != CCS811_OK) { + if (ccs811_read_iaq(&sensor, &tvoc, &eco2, 0, 0) == CCS811_OK) { /* print values */ printf("TVOC [ppb]: %d\neCO2 [ppm]: %d\n", tvoc, eco2); puts("+-------------------------------------+");