1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-29 14:52:12 +01:00

OP-1308 Merge with next (conflict with stabilization)

This commit is contained in:
Bertrand Oresve 2014-05-08 22:33:45 +02:00
parent fd1b786868
commit 743cf4e4b5
3 changed files with 8 additions and 6 deletions

View File

@ -39,6 +39,7 @@
#include <systemalarms.h>
#include <taskinfo.h>
/****************************
* Current checks:
* 1. If a flight mode switch allows autotune and autotune module not running

View File

@ -119,21 +119,21 @@ static void stabilizationInnerloopTask()
warn = true;
}
if (stabSettings.monitor.rateupdates < -(4 * OUTERLOOP_SKIPCOUNT)) {
// error if rate loop skipped more than 4 executions
error = true;
// critical if rate loop skipped more than 4 executions
crit = true;
}
// check if gyro keeps updating
if (stabSettings.monitor.gyroupdates < 1) {
// critical if gyro didn't update at all!
crit = true;
// error if gyro didn't update at all!
error = true;
}
if (stabSettings.monitor.gyroupdates > 1) {
// warning if we missed a gyro update
warn = true;
}
if (stabSettings.monitor.gyroupdates > 3) {
// error if we missed 3 gyro updates
error = true;
// critical if we missed 3 gyro updates
crit = true;
}
stabSettings.monitor.gyroupdates = 0;

View File

@ -31,6 +31,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <openpilot.h>
#include <pios_struct_helper.h>
#include <pid.h>