sensors: check other gyros on timeout

@bkueng reviewed this and found that it is dangerous to continue on
timeout because we don't update other gyro sensors in the timeout case.
This commit is contained in:
Julian Oes
2018-11-27 11:14:19 +01:00
parent 8e4296d000
commit 1165739a56
+3 -7
View File
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2012-2017 PX4 Development Team. All rights reserved.
* Copyright (c) 2012-2018 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -630,12 +630,8 @@ Sensors::run()
* if a gyro fails) */
int pret = px4_poll(&poll_fds, 1, 50);
/* if pret == 0 it timed out - periodic check for should_exit(), etc. */
if (pret == 0) {
continue;
}
/* If pret == 0 it timed out but we should still do all checks and potentially copy
* other gyros. */
/* this is undesirable but not much we can do - might want to flag unhappy status */
if (pret < 0) {