1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tests/driver_ccs811%: fix read return code check

This commit is contained in:
Francisco Molina 2021-03-21 20:43:04 +01:00
parent fd36c626a3
commit 4a4a159cb6
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8
2 changed files with 2 additions and 2 deletions

View File

@ -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("+-------------------------------------+");
}

View File

@ -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("+-------------------------------------+");