1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

Merge pull request #16215 from fjmolinas/pr_tests_ccs811

tests/driver_ccs811%: fix read return code check
This commit is contained in:
Leandro Lanzieri 2021-03-21 21:15:52 +01:00 committed by GitHub
commit 889983697e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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("+-------------------------------------+");