1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-03 11:24:10 +01:00

OP-1371 treat hitl as nav capable fusion algorithm if positionstate is set by sim

This commit is contained in:
Corvus Corax 2014-06-18 21:29:55 +02:00
parent dfdce20044
commit b40a114a0a

View File

@ -38,6 +38,7 @@
#include <systemsettings.h> #include <systemsettings.h>
#include <systemalarms.h> #include <systemalarms.h>
#include <revosettings.h> #include <revosettings.h>
#include <positionstate.h>
#include <taskinfo.h> #include <taskinfo.h>
// a number of useful macros // a number of useful macros
@ -79,10 +80,17 @@ int32_t configuration_check()
break; break;
default: default:
navCapableFusion = false; navCapableFusion = false;
// check for hitl. hitl allows to feed position and velocity state via
// telemetry, this makes nav possible even with an unsuited algorithm
if (PositionStateHandle()) {
if (PositionStateReadOnly()) {
navCapableFusion = true;
}
}
} }
#else #else
const bool navCapableFusion = false; const bool navCapableFusion = false;
#endif #endif /* ifdef REVOLUTION */
// Classify airframe type // Classify airframe type