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:
parent
fd36c626a3
commit
4a4a159cb6
@ -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("+-------------------------------------+");
|
||||
}
|
||||
|
@ -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("+-------------------------------------+");
|
||||
|
Loading…
Reference in New Issue
Block a user