tests/driver_ccs811%: fix read return code check
This commit is contained in:
parent
fd36c626a3
commit
4a4a159cb6
@ -58,7 +58,7 @@ int main(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* read the data and print them on success */
|
/* 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);
|
printf("TVOC [ppb]: %d\neCO2 [ppm]: %d\n", tvoc, eco2);
|
||||||
puts("+-------------------------------------+");
|
puts("+-------------------------------------+");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,7 +89,7 @@ int main(void)
|
|||||||
msg_receive(&msg);
|
msg_receive(&msg);
|
||||||
|
|
||||||
/* read the data */
|
/* 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 */
|
/* print values */
|
||||||
printf("TVOC [ppb]: %d\neCO2 [ppm]: %d\n", tvoc, eco2);
|
printf("TVOC [ppb]: %d\neCO2 [ppm]: %d\n", tvoc, eco2);
|
||||||
puts("+-------------------------------------+");
|
puts("+-------------------------------------+");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user