Skip to content
Snippets Groups Projects
Commit 1165739a authored by Julian Oes's avatar Julian Oes
Browse files

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.
parent 8e4296d0
No related branches found
No related tags found
No related merge requests found
/****************************************************************************
*
* 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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment