mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
OP-1122 OP-1158 renamed FlightPlanInfo uavobject to FlightPlan
This commit is contained in:
parent
c8a81f88a4
commit
aa24f2193a
@ -31,7 +31,7 @@
|
||||
|
||||
#include "openpilot.h"
|
||||
|
||||
#include "flightplaninfo.h"
|
||||
#include "flightplan.h"
|
||||
#include "flightstatus.h"
|
||||
#include "airspeedstate.h"
|
||||
#include "pathaction.h"
|
||||
@ -100,7 +100,7 @@ int32_t PathPlannerInitialize()
|
||||
{
|
||||
taskHandle = NULL;
|
||||
|
||||
FlightPlanInfoInitialize();
|
||||
FlightPlanInitialize();
|
||||
PathActionInitialize();
|
||||
PathStatusInitialize();
|
||||
PathDesiredInitialize();
|
||||
@ -269,6 +269,8 @@ void updatePathDesired(__attribute__((unused)) UAVObjEvent *ev)
|
||||
static void setWaypoint(uint16_t num)
|
||||
{
|
||||
// path plans wrap around
|
||||
|
||||
// TODO change to FlightPlan.WaypointCount
|
||||
if (num >= UAVObjGetNumInstances(WaypointHandle())) {
|
||||
num = 0;
|
||||
}
|
||||
@ -277,10 +279,10 @@ static void setWaypoint(uint16_t num)
|
||||
WaypointActiveSet(&waypointActive);
|
||||
}
|
||||
|
||||
// execute the apropriate condition and report result
|
||||
// execute the appropriate condition and report result
|
||||
static uint8_t pathConditionCheck()
|
||||
{
|
||||
// i thought about a lookup table, but a switch is saver considering there could be invalid EndCondition ID's
|
||||
// i thought about a lookup table, but a switch is safer considering there could be invalid EndCondition ID's
|
||||
switch (pathAction.EndCondition) {
|
||||
case PATHACTION_ENDCONDITION_NONE:
|
||||
return conditionNone();
|
||||
|
@ -43,7 +43,7 @@ UAVOBJSRCFILENAMES += debuglogentry
|
||||
UAVOBJSRCFILENAMES += flightbatterysettings
|
||||
UAVOBJSRCFILENAMES += firmwareiapobj
|
||||
UAVOBJSRCFILENAMES += flightbatterystate
|
||||
UAVOBJSRCFILENAMES += flightplaninfo
|
||||
UAVOBJSRCFILENAMES += flightplan
|
||||
UAVOBJSRCFILENAMES += flightplancontrol
|
||||
UAVOBJSRCFILENAMES += flightplansettings
|
||||
UAVOBJSRCFILENAMES += flightplanstatus
|
||||
|
@ -44,7 +44,7 @@ UAVOBJSRCFILENAMES += airspeedstate
|
||||
UAVOBJSRCFILENAMES += flightbatterysettings
|
||||
UAVOBJSRCFILENAMES += firmwareiapobj
|
||||
UAVOBJSRCFILENAMES += flightbatterystate
|
||||
UAVOBJSRCFILENAMES += flightplaninfo
|
||||
UAVOBJSRCFILENAMES += flightplan
|
||||
UAVOBJSRCFILENAMES += flightplancontrol
|
||||
UAVOBJSRCFILENAMES += flightplansettings
|
||||
UAVOBJSRCFILENAMES += flightplanstatus
|
||||
|
@ -42,7 +42,7 @@ void ModelUavoProxy::sendFlightPlan()
|
||||
{
|
||||
modelToObjects();
|
||||
|
||||
FlightPlanInfo *flightPlan = FlightPlanInfo::GetInstance(objMngr, 0);
|
||||
FlightPlan *flightPlan = FlightPlan::GetInstance(objMngr, 0);
|
||||
connect(flightPlan, SIGNAL(transactionCompleted(UAVObject *, bool)), this, SLOT(flightPlanElementSent(UAVObject *, bool)));
|
||||
|
||||
Waypoint *waypoint = Waypoint::GetInstance(objMngr, 0);
|
||||
@ -81,7 +81,7 @@ void ModelUavoProxy::flightPlanElementSent(UAVObject *obj, bool success)
|
||||
|
||||
void ModelUavoProxy::receiveFlightPlan()
|
||||
{
|
||||
FlightPlanInfo *flightPlan = FlightPlanInfo::GetInstance(objMngr, 0);
|
||||
FlightPlan *flightPlan = FlightPlan::GetInstance(objMngr, 0);
|
||||
connect(flightPlan, SIGNAL(transactionCompleted(UAVObject *, bool)), this, SLOT(flightPlanElementReceived(UAVObject *, bool)));
|
||||
|
||||
Waypoint *waypoint = Waypoint::GetInstance(objMngr, 0);
|
||||
@ -199,9 +199,9 @@ void ModelUavoProxy::modelToObjects()
|
||||
}
|
||||
}
|
||||
|
||||
// Update FlightPlanInfo
|
||||
FlightPlanInfo *flightPlan = FlightPlanInfo::GetInstance(objMngr);
|
||||
FlightPlanInfo::DataFields flightPlanData = flightPlan->getData();
|
||||
// Update FlightPlan
|
||||
FlightPlan *flightPlan = FlightPlan::GetInstance(objMngr);
|
||||
FlightPlan::DataFields flightPlanData = flightPlan->getData();
|
||||
|
||||
flightPlanData.WaypointCount = waypointCount;
|
||||
flightPlanData.PathActionCount = actionCount;
|
||||
@ -293,8 +293,8 @@ void ModelUavoProxy::objectsToModel()
|
||||
// the list of objects can end with "garbage" instances due to previous flightpath
|
||||
// they need to be ignored
|
||||
|
||||
FlightPlanInfo *flightPlan = FlightPlanInfo::GetInstance(objMngr);
|
||||
FlightPlanInfo::DataFields flightPlanData = flightPlan->getData();
|
||||
FlightPlan *flightPlan = FlightPlan::GetInstance(objMngr);
|
||||
FlightPlan::DataFields flightPlanData = flightPlan->getData();
|
||||
|
||||
int waypointCount = flightPlanData.WaypointCount;
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "flightdatamodel.h"
|
||||
|
||||
#include "flightplaninfo.h"
|
||||
#include "flightplan.h"
|
||||
#include "pathaction.h"
|
||||
#include "waypoint.h"
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = UAVObjects
|
||||
|
||||
DEFINES += UAVOBJECTS_LIBRARY
|
||||
|
||||
include(../../openpilotgcsplugin.pri)
|
||||
include(uavobjects_dependencies.pri)
|
||||
|
||||
HEADERS += uavobjects_global.h \
|
||||
HEADERS += \
|
||||
uavobjects_global.h \
|
||||
uavobject.h \
|
||||
uavmetaobject.h \
|
||||
uavobjectmanager.h \
|
||||
@ -14,7 +17,8 @@ HEADERS += uavobjects_global.h \
|
||||
uavobjectsplugin.h \
|
||||
uavobjecthelper.h
|
||||
|
||||
SOURCES += uavobject.cpp \
|
||||
SOURCES += \
|
||||
uavobject.cpp \
|
||||
uavmetaobject.cpp \
|
||||
uavobjectmanager.cpp \
|
||||
uavdataobject.cpp \
|
||||
@ -25,7 +29,8 @@ SOURCES += uavobject.cpp \
|
||||
OTHER_FILES += UAVObjects.pluginspec
|
||||
|
||||
# Add in all of the synthetic/generated uavobject files
|
||||
HEADERS += $$UAVOBJECT_SYNTHETICS/accessorydesired.h \
|
||||
HEADERS += \
|
||||
$$UAVOBJECT_SYNTHETICS/accessorydesired.h \
|
||||
$$UAVOBJECT_SYNTHETICS/barosensor.h \
|
||||
$$UAVOBJECT_SYNTHETICS/airspeedsensor.h \
|
||||
$$UAVOBJECT_SYNTHETICS/airspeedsettings.h \
|
||||
@ -92,7 +97,7 @@ HEADERS += $$UAVOBJECT_SYNTHETICS/accessorydesired.h \
|
||||
$$UAVOBJECT_SYNTHETICS/i2cstats.h \
|
||||
$$UAVOBJECT_SYNTHETICS/flightbatterysettings.h \
|
||||
$$UAVOBJECT_SYNTHETICS/taskinfo.h \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplaninfo.h \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplan.h \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplanstatus.h \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplansettings.h \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplancontrol.h \
|
||||
@ -118,7 +123,8 @@ HEADERS += $$UAVOBJECT_SYNTHETICS/accessorydesired.h \
|
||||
$$UAVOBJECT_SYNTHETICS/waypointactive.h \
|
||||
$$UAVOBJECT_SYNTHETICS/mpu6000settings.h
|
||||
|
||||
SOURCES += $$UAVOBJECT_SYNTHETICS/accessorydesired.cpp \
|
||||
SOURCES += \
|
||||
$$UAVOBJECT_SYNTHETICS/accessorydesired.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/barosensor.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/airspeedsensor.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/airspeedsettings.cpp \
|
||||
@ -185,7 +191,7 @@ SOURCES += $$UAVOBJECT_SYNTHETICS/accessorydesired.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/i2cstats.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/flightbatterysettings.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/taskinfo.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplaninfo.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplan.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplanstatus.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplansettings.cpp \
|
||||
$$UAVOBJECT_SYNTHETICS/flightplancontrol.cpp \
|
||||
|
@ -1,5 +1,5 @@
|
||||
<xml>
|
||||
<object name="FlightPlanInfo" singleinstance="true" settings="false" category="Navigation">
|
||||
<object name="FlightPlan" singleinstance="true" settings="false" category="Navigation">
|
||||
<description>Flight plan informations</description>
|
||||
|
||||
<field name="WaypointCount" units="" type="uint16" elements="1" default="0" />
|
Loading…
x
Reference in New Issue
Block a user