icm42688p: only check configured registers periodically (as intended)

This commit is contained in:
Daniel Agar 2022-05-23 10:16:55 -04:00
parent c57c575cfe
commit d25a784a3a
1 changed files with 15 additions and 13 deletions

View File

@ -274,6 +274,7 @@ void ICM42688P::RunImpl()
}
}
if (!success || hrt_elapsed_time(&_last_config_check_timestamp) > 100_ms) {
// check configuration registers periodically or immediately following any failure
if (RegisterCheck(_register_bank0_cfg[_checked_register_bank0])
&& RegisterCheck(_register_bank1_cfg[_checked_register_bank1])
@ -290,6 +291,7 @@ void ICM42688P::RunImpl()
Reset();
}
}
}
break;
}