1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

Use Correct Airspeed object in PathPlanner, (and use CalibratedAirspeed, since its more relevant)

This commit is contained in:
Corvus Corax 2012-11-01 03:46:29 +01:00
parent 3458aec53e
commit ffaab02479

View File

@ -33,7 +33,7 @@
#include "paths.h"
#include "flightstatus.h"
#include "baroairspeed.h" // TODO: make baroairspeed optional
#include "airspeedactual.h"
#include "pathaction.h"
#include "pathdesired.h"
#include "pathstatus.h"
@ -110,7 +110,7 @@ int32_t PathPlannerInitialize()
PathStatusInitialize();
PathDesiredInitialize();
PositionActualInitialize();
BaroAirspeedInitialize();
AirspeedActualInitialize();
VelocityActualInitialize();
WaypointInitialize();
WaypointActiveInitialize();
@ -482,11 +482,9 @@ static uint8_t conditionAboveSpeed() {
// use airspeed if requested and available
if (pathAction.ConditionParameters[1]>0.5f) {
BaroAirspeedData baroAirspeed;
BaroAirspeedGet (&baroAirspeed);
if (baroAirspeed.BaroConnected == BAROAIRSPEED_BAROCONNECTED_TRUE) {
velocity = baroAirspeed.TrueAirspeed;
}
AirspeedActualData airspeed;
AirspeedActualGet (&airspeed);
velocity = airspeed.CalibratedAirspeed;
}
if ( velocity >= pathAction.ConditionParameters[0]) {