From 007f7cbea027be59dc0571d323f68941ab890705 Mon Sep 17 00:00:00 2001 From: vassilis Date: Sun, 9 Jan 2011 22:28:39 +0000 Subject: [PATCH] GCS/FlightPlan: Create FlighPlan module related objects git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2363 ebee16cc-31ac-478f-84a7-5cbb03baadba --- ground/src/plugins/uavobjects/OPLogConvert.m | 96 ++++++++++- .../plugins/uavobjects/flightplancontrol.cpp | 131 +++++++++++++++ .../plugins/uavobjects/flightplancontrol.h | 79 +++++++++ .../plugins/uavobjects/flightplancontrol.py | 86 ++++++++++ .../plugins/uavobjects/flightplansettings.cpp | 132 +++++++++++++++ .../plugins/uavobjects/flightplansettings.h | 79 +++++++++ .../plugins/uavobjects/flightplansettings.py | 86 ++++++++++ .../plugins/uavobjects/flightplanstatus.cpp | 154 ++++++++++++++++++ .../src/plugins/uavobjects/flightplanstatus.h | 91 +++++++++++ .../plugins/uavobjects/flightplanstatus.py | 133 +++++++++++++++ ground/src/plugins/uavobjects/taskinfo.cpp | 2 + ground/src/plugins/uavobjects/taskinfo.h | 14 +- ground/src/plugins/uavobjects/taskinfo.py | 8 +- ground/src/plugins/uavobjects/uavobjects.pro | 10 +- .../src/plugins/uavobjects/uavobjectsinit.cpp | 6 + .../uavobjectdefinition/flightplancontrol.xml | 10 ++ .../flightplansettings.xml | 10 ++ .../uavobjectdefinition/flightplanstatus.xml | 14 ++ .../shared/uavobjectdefinition/taskinfo.xml | 4 +- 19 files changed, 1130 insertions(+), 15 deletions(-) create mode 100644 ground/src/plugins/uavobjects/flightplancontrol.cpp create mode 100644 ground/src/plugins/uavobjects/flightplancontrol.h create mode 100644 ground/src/plugins/uavobjects/flightplancontrol.py create mode 100644 ground/src/plugins/uavobjects/flightplansettings.cpp create mode 100644 ground/src/plugins/uavobjects/flightplansettings.h create mode 100644 ground/src/plugins/uavobjects/flightplansettings.py create mode 100644 ground/src/plugins/uavobjects/flightplanstatus.cpp create mode 100644 ground/src/plugins/uavobjects/flightplanstatus.h create mode 100644 ground/src/plugins/uavobjects/flightplanstatus.py create mode 100644 ground/src/shared/uavobjectdefinition/flightplancontrol.xml create mode 100644 ground/src/shared/uavobjectdefinition/flightplansettings.xml create mode 100644 ground/src/shared/uavobjectdefinition/flightplanstatus.xml diff --git a/ground/src/plugins/uavobjects/OPLogConvert.m b/ground/src/plugins/uavobjects/OPLogConvert.m index 1070fb62d..0ff341ca2 100644 --- a/ground/src/plugins/uavobjects/OPLogConvert.m +++ b/ground/src/plugins/uavobjects/OPLogConvert.m @@ -135,6 +135,22 @@ function [] = OPLogConvert() FlightBatteryState(1).ConsumedEnergy = 0; FlightBatteryState(1).EstimatedFlightTime = 0; + flightplancontrolIdx = 1; + FlightPlanControl.timestamp = 0; + FlightPlanControl(1).Test = 0; + + flightplansettingsIdx = 1; + FlightPlanSettings.timestamp = 0; + FlightPlanSettings(1).Test = 0; + + flightplanstatusIdx = 1; + FlightPlanStatus.timestamp = 0; + FlightPlanStatus(1).Status = 0; + FlightPlanStatus(1).ErrorType = 0; + FlightPlanStatus(1).ErrorFileID = 0; + FlightPlanStatus(1).ErrorLineNum = 0; + FlightPlanStatus(1).Debug = 0; + flighttelemetrystatsIdx = 1; FlightTelemetryStats.timestamp = 0; FlightTelemetryStats(1).Status = 0; @@ -376,6 +392,11 @@ function [] = OPLogConvert() SystemStats(1).HeapRemaining = 0; SystemStats(1).CPULoad = 0; + taskinfoIdx = 1; + TaskInfo.timestamp = 0; + TaskInfo(1).StackRemaining = zeros(1,13); + TaskInfo(1).Running = zeros(1,13); + telemetrysettingsIdx = 1; TelemetrySettings.timestamp = 0; TelemetrySettings(1).Speed = 0; @@ -466,6 +487,15 @@ function [] = OPLogConvert() case 126985486 FlightBatteryState(flightbatterystateIdx) = ReadFlightBatteryStateObject(fid, timestamp); flightbatterystateIdx = flightbatterystateIdx + 1; + case 4125349796 + FlightPlanControl(flightplancontrolIdx) = ReadFlightPlanControlObject(fid, timestamp); + flightplancontrolIdx = flightplancontrolIdx + 1; + case 2234942498 + FlightPlanSettings(flightplansettingsIdx) = ReadFlightPlanSettingsObject(fid, timestamp); + flightplansettingsIdx = flightplansettingsIdx + 1; + case 2726772894 + FlightPlanStatus(flightplanstatusIdx) = ReadFlightPlanStatusObject(fid, timestamp); + flightplanstatusIdx = flightplanstatusIdx + 1; case 1712072286 FlightTelemetryStats(flighttelemetrystatsIdx) = ReadFlightTelemetryStatsObject(fid, timestamp); flighttelemetrystatsIdx = flighttelemetrystatsIdx + 1; @@ -532,6 +562,9 @@ function [] = OPLogConvert() case 680908530 SystemStats(systemstatsIdx) = ReadSystemStatsObject(fid, timestamp); systemstatsIdx = systemstatsIdx + 1; + case 1358273008 + TaskInfo(taskinfoIdx) = ReadTaskInfoObject(fid, timestamp); + taskinfoIdx = taskinfoIdx + 1; case 2785592614 TelemetrySettings(telemetrysettingsIdx) = ReadTelemetrySettingsObject(fid, timestamp); telemetrysettingsIdx = telemetrysettingsIdx + 1; @@ -554,7 +587,7 @@ function [] = OPLogConvert() fclose(fid); matfile = strrep(logfile,'opl','mat'); - save(matfile ,'ActuatorCommand','ActuatorDesired','ActuatorSettings','AHRSCalibration','AHRSSettings','AhrsStatus','AttitudeActual','AttitudeDesired','AttitudeRaw','BaroAltitude','BatterySettings','FirmwareIAPObj','FlightBatteryState','FlightTelemetryStats','GCSTelemetryStats','GPSPosition','GPSSatellites','GPSTime','GuidanceSettings','HomeLocation','I2CStats','ManualControlCommand','ManualControlSettings','MixerSettings','MixerStatus','ObjectPersistence','PipXtremeModemSettings','PipXtremeModemStatus','PositionActual','PositionDesired','RateDesired','StabilizationSettings','SystemAlarms','SystemSettings','SystemStats','TelemetrySettings','VelocityActual','VelocityDesired'); + save(matfile ,'ActuatorCommand','ActuatorDesired','ActuatorSettings','AHRSCalibration','AHRSSettings','AhrsStatus','AttitudeActual','AttitudeDesired','AttitudeRaw','BaroAltitude','BatterySettings','FirmwareIAPObj','FlightBatteryState','FlightPlanControl','FlightPlanSettings','FlightPlanStatus','FlightTelemetryStats','GCSTelemetryStats','GPSPosition','GPSSatellites','GPSTime','GuidanceSettings','HomeLocation','I2CStats','ManualControlCommand','ManualControlSettings','MixerSettings','MixerStatus','ObjectPersistence','PipXtremeModemSettings','PipXtremeModemStatus','PositionActual','PositionDesired','RateDesired','StabilizationSettings','SystemAlarms','SystemSettings','SystemStats','TaskInfo','TelemetrySettings','VelocityActual','VelocityDesired'); end @@ -824,6 +857,52 @@ function [FlightBatteryState] = ReadFlightBatteryStateObject(fid, timestamp) fread(fid, 1, 'uint8'); end +function [FlightPlanControl] = ReadFlightPlanControlObject(fid, timestamp) + if 1 + headerSize = 8; + else + FlightPlanControl.instanceID = fread(fid, 1, 'uint16'); + headerSize = 10; + end + + FlightPlanControl.timestamp = timestamp; + FlightPlanControl.Test = double(fread(fid, 1, 'float32')); + % read CRC + fread(fid, 1, 'uint8'); +end + +function [FlightPlanSettings] = ReadFlightPlanSettingsObject(fid, timestamp) + if 1 + headerSize = 8; + else + FlightPlanSettings.instanceID = fread(fid, 1, 'uint16'); + headerSize = 10; + end + + FlightPlanSettings.timestamp = timestamp; + FlightPlanSettings.Test = double(fread(fid, 1, 'float32')); + % read CRC + fread(fid, 1, 'uint8'); +end + +function [FlightPlanStatus] = ReadFlightPlanStatusObject(fid, timestamp) + if 1 + headerSize = 8; + else + FlightPlanStatus.instanceID = fread(fid, 1, 'uint16'); + headerSize = 10; + end + + FlightPlanStatus.timestamp = timestamp; + FlightPlanStatus.Status = double(fread(fid, 1, 'uint8')); + FlightPlanStatus.ErrorType = double(fread(fid, 1, 'uint8')); + FlightPlanStatus.ErrorFileID = double(fread(fid, 1, 'uint32')); + FlightPlanStatus.ErrorLineNum = double(fread(fid, 1, 'uint32')); + FlightPlanStatus.Debug = double(fread(fid, 1, 'float32')); + % read CRC + fread(fid, 1, 'uint8'); +end + function [FlightTelemetryStats] = ReadFlightTelemetryStatsObject(fid, timestamp) if 1 headerSize = 8; @@ -1285,6 +1364,21 @@ function [SystemStats] = ReadSystemStatsObject(fid, timestamp) fread(fid, 1, 'uint8'); end +function [TaskInfo] = ReadTaskInfoObject(fid, timestamp) + if 1 + headerSize = 8; + else + TaskInfo.instanceID = fread(fid, 1, 'uint16'); + headerSize = 10; + end + + TaskInfo.timestamp = timestamp; + TaskInfo.StackRemaining = double(fread(fid, 13, 'uint16')); + TaskInfo.Running = double(fread(fid, 13, 'uint8')); + % read CRC + fread(fid, 1, 'uint8'); +end + function [TelemetrySettings] = ReadTelemetrySettingsObject(fid, timestamp) if 1 headerSize = 8; diff --git a/ground/src/plugins/uavobjects/flightplancontrol.cpp b/ground/src/plugins/uavobjects/flightplancontrol.cpp new file mode 100644 index 000000000..d7fa3049a --- /dev/null +++ b/ground/src/plugins/uavobjects/flightplancontrol.cpp @@ -0,0 +1,131 @@ +/** + ****************************************************************************** + * + * @file flightplancontrol.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @see The GNU Public License (GPL) Version 3 + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup UAVObjectsPlugin UAVObjects Plugin + * @{ + * + * @note Object definition file: flightplancontrol.xml. + * This is an automatically generated file. + * DO NOT modify manually. + * + * @brief The UAVUObjects GCS plugin + *****************************************************************************/ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "flightplancontrol.h" +#include "uavobjectfield.h" + +const QString FlightPlanControl::NAME = QString("FlightPlanControl"); +const QString FlightPlanControl::DESCRIPTION = QString("Control the flight plan script"); + +/** + * Constructor + */ +FlightPlanControl::FlightPlanControl(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAME) +{ + // Create fields + QList fields; + QStringList TestElemNames; + TestElemNames.append("0"); + fields.append( new UAVObjectField(QString("Test"), QString("%"), UAVObjectField::FLOAT32, TestElemNames, QStringList()) ); + + // Initialize object + initializeFields(fields, (quint8*)&data, NUMBYTES); + // Set the default field values + setDefaultFieldValues(); + // Set the object description + setDescription(DESCRIPTION); +} + +/** + * Get the default metadata for this object + */ +UAVObject::Metadata FlightPlanControl::getDefaultMetadata() +{ + UAVObject::Metadata metadata; + metadata.flightAccess = ACCESS_READWRITE; + metadata.gcsAccess = ACCESS_READWRITE; + metadata.gcsTelemetryAcked = 1; + metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE; + metadata.gcsTelemetryUpdatePeriod = 0; + metadata.flightTelemetryAcked = 1; + metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_MANUAL; + metadata.flightTelemetryUpdatePeriod = 0; + metadata.loggingUpdateMode = UAVObject::UPDATEMODE_NEVER; + metadata.loggingUpdatePeriod = 0; + return metadata; +} + +/** + * Initialize object fields with the default values. + * If a default value is not specified the object fields + * will be initialized to zero. + */ +void FlightPlanControl::setDefaultFieldValues() +{ + +} + +/** + * Get the object data fields + */ +FlightPlanControl::DataFields FlightPlanControl::getData() +{ + QMutexLocker locker(mutex); + return data; +} + +/** + * Set the object data fields + */ +void FlightPlanControl::setData(const DataFields& data) +{ + QMutexLocker locker(mutex); + // Get metadata + Metadata mdata = getMetadata(); + // Update object if the access mode permits + if ( mdata.gcsAccess == ACCESS_READWRITE ) + { + this->data = data; + emit objectUpdatedAuto(this); // trigger object updated event + emit objectUpdated(this); + } +} + +/** + * Create a clone of this object, a new instance ID must be specified. + * Do not use this function directly to create new instances, the + * UAVObjectManager should be used instead. + */ +UAVDataObject* FlightPlanControl::clone(quint32 instID) +{ + FlightPlanControl* obj = new FlightPlanControl(); + obj->initialize(instID, this->getMetaObject()); + return obj; +} + +/** + * Static function to retrieve an instance of the object. + */ +FlightPlanControl* FlightPlanControl::GetInstance(UAVObjectManager* objMngr, quint32 instID) +{ + return dynamic_cast(objMngr->getObject(FlightPlanControl::OBJID, instID)); +} diff --git a/ground/src/plugins/uavobjects/flightplancontrol.h b/ground/src/plugins/uavobjects/flightplancontrol.h new file mode 100644 index 000000000..68216d7c8 --- /dev/null +++ b/ground/src/plugins/uavobjects/flightplancontrol.h @@ -0,0 +1,79 @@ +/** + ****************************************************************************** + * + * @file flightplancontrol.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @see The GNU Public License (GPL) Version 3 + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup UAVObjectsPlugin UAVObjects Plugin + * @{ + * + * @note Object definition file: flightplancontrol.xml. + * This is an automatically generated file. + * DO NOT modify manually. + * + * @brief The UAVUObjects GCS plugin + *****************************************************************************/ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef FLIGHTPLANCONTROL_H +#define FLIGHTPLANCONTROL_H + +#include "uavdataobject.h" +#include "uavobjectmanager.h" + +class UAVOBJECTS_EXPORT FlightPlanControl: public UAVDataObject +{ + Q_OBJECT + +public: + // Field structure + typedef struct { + float Test; + + } __attribute__((packed)) DataFields; + + // Field information + // Field Test information + + + // Constants + static const quint32 OBJID = 4125349796U; + static const QString NAME; + static const QString DESCRIPTION; + static const bool ISSINGLEINST = 1; + static const bool ISSETTINGS = 0; + static const quint32 NUMBYTES = sizeof(DataFields); + + // Functions + FlightPlanControl(); + + DataFields getData(); + void setData(const DataFields& data); + Metadata getDefaultMetadata(); + UAVDataObject* clone(quint32 instID); + + static FlightPlanControl* GetInstance(UAVObjectManager* objMngr, quint32 instID = 0); + +private: + DataFields data; + + void setDefaultFieldValues(); + +}; + +#endif // FLIGHTPLANCONTROL_H diff --git a/ground/src/plugins/uavobjects/flightplancontrol.py b/ground/src/plugins/uavobjects/flightplancontrol.py new file mode 100644 index 000000000..f0d9556ce --- /dev/null +++ b/ground/src/plugins/uavobjects/flightplancontrol.py @@ -0,0 +1,86 @@ +## +############################################################################## +# +# @file flightplancontrol.py +# @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. +# @brief Implementation of the FlightPlanControl object. This file has been +# automatically generated by the UAVObjectGenerator. +# +# @note Object definition file: flightplancontrol.xml. +# This is an automatically generated file. +# DO NOT modify manually. +# +# @see The GNU Public License (GPL) Version 3 +# +#############################################################################/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + + +import uavobject + +import struct +from collections import namedtuple + +# This is a list of instances of the data fields contained in this object +_fields = [ \ + uavobject.UAVObjectField( + 'Test', + 'f', + 1, + [ + '0', + ], + { + } + ), +] + + +class FlightPlanControl(uavobject.UAVObject): + ## Object constants + OBJID = 4125349796 + NAME = "FlightPlanControl" + METANAME = "FlightPlanControlMeta" + ISSINGLEINST = 1 + ISSETTINGS = 0 + + def __init__(self): + uavobject.UAVObject.__init__(self, + self.OBJID, + self.NAME, + self.METANAME, + 0, + self.ISSINGLEINST) + + for f in _fields: + self.add_field(f) + + def __str__(self): + s = ("0x%08X (%10u) %-30s %3u bytes format '%s'\n" + % (self.OBJID, self.OBJID, self.NAME, self.get_struct().size, self.get_struct().format)) + for f in self.get_tuple()._fields: + s += ("\t%s\n" % f) + return (s) + +def main(): + # Instantiate the object and dump out some interesting info + x = FlightPlanControl() + print (x) + +if __name__ == "__main__": + #import pdb ; pdb.run('main()') + main() diff --git a/ground/src/plugins/uavobjects/flightplansettings.cpp b/ground/src/plugins/uavobjects/flightplansettings.cpp new file mode 100644 index 000000000..dee64c392 --- /dev/null +++ b/ground/src/plugins/uavobjects/flightplansettings.cpp @@ -0,0 +1,132 @@ +/** + ****************************************************************************** + * + * @file flightplansettings.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @see The GNU Public License (GPL) Version 3 + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup UAVObjectsPlugin UAVObjects Plugin + * @{ + * + * @note Object definition file: flightplansettings.xml. + * This is an automatically generated file. + * DO NOT modify manually. + * + * @brief The UAVUObjects GCS plugin + *****************************************************************************/ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "flightplansettings.h" +#include "uavobjectfield.h" + +const QString FlightPlanSettings::NAME = QString("FlightPlanSettings"); +const QString FlightPlanSettings::DESCRIPTION = QString("Settings for the flight plan module, control the execution of the script"); + +/** + * Constructor + */ +FlightPlanSettings::FlightPlanSettings(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAME) +{ + // Create fields + QList fields; + QStringList TestElemNames; + TestElemNames.append("0"); + fields.append( new UAVObjectField(QString("Test"), QString(""), UAVObjectField::FLOAT32, TestElemNames, QStringList()) ); + + // Initialize object + initializeFields(fields, (quint8*)&data, NUMBYTES); + // Set the default field values + setDefaultFieldValues(); + // Set the object description + setDescription(DESCRIPTION); +} + +/** + * Get the default metadata for this object + */ +UAVObject::Metadata FlightPlanSettings::getDefaultMetadata() +{ + UAVObject::Metadata metadata; + metadata.flightAccess = ACCESS_READWRITE; + metadata.gcsAccess = ACCESS_READWRITE; + metadata.gcsTelemetryAcked = 1; + metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE; + metadata.gcsTelemetryUpdatePeriod = 0; + metadata.flightTelemetryAcked = 1; + metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_ONCHANGE; + metadata.flightTelemetryUpdatePeriod = 0; + metadata.loggingUpdateMode = UAVObject::UPDATEMODE_NEVER; + metadata.loggingUpdatePeriod = 0; + return metadata; +} + +/** + * Initialize object fields with the default values. + * If a default value is not specified the object fields + * will be initialized to zero. + */ +void FlightPlanSettings::setDefaultFieldValues() +{ + data.Test = 0; + +} + +/** + * Get the object data fields + */ +FlightPlanSettings::DataFields FlightPlanSettings::getData() +{ + QMutexLocker locker(mutex); + return data; +} + +/** + * Set the object data fields + */ +void FlightPlanSettings::setData(const DataFields& data) +{ + QMutexLocker locker(mutex); + // Get metadata + Metadata mdata = getMetadata(); + // Update object if the access mode permits + if ( mdata.gcsAccess == ACCESS_READWRITE ) + { + this->data = data; + emit objectUpdatedAuto(this); // trigger object updated event + emit objectUpdated(this); + } +} + +/** + * Create a clone of this object, a new instance ID must be specified. + * Do not use this function directly to create new instances, the + * UAVObjectManager should be used instead. + */ +UAVDataObject* FlightPlanSettings::clone(quint32 instID) +{ + FlightPlanSettings* obj = new FlightPlanSettings(); + obj->initialize(instID, this->getMetaObject()); + return obj; +} + +/** + * Static function to retrieve an instance of the object. + */ +FlightPlanSettings* FlightPlanSettings::GetInstance(UAVObjectManager* objMngr, quint32 instID) +{ + return dynamic_cast(objMngr->getObject(FlightPlanSettings::OBJID, instID)); +} diff --git a/ground/src/plugins/uavobjects/flightplansettings.h b/ground/src/plugins/uavobjects/flightplansettings.h new file mode 100644 index 000000000..de2350a0b --- /dev/null +++ b/ground/src/plugins/uavobjects/flightplansettings.h @@ -0,0 +1,79 @@ +/** + ****************************************************************************** + * + * @file flightplansettings.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @see The GNU Public License (GPL) Version 3 + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup UAVObjectsPlugin UAVObjects Plugin + * @{ + * + * @note Object definition file: flightplansettings.xml. + * This is an automatically generated file. + * DO NOT modify manually. + * + * @brief The UAVUObjects GCS plugin + *****************************************************************************/ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef FLIGHTPLANSETTINGS_H +#define FLIGHTPLANSETTINGS_H + +#include "uavdataobject.h" +#include "uavobjectmanager.h" + +class UAVOBJECTS_EXPORT FlightPlanSettings: public UAVDataObject +{ + Q_OBJECT + +public: + // Field structure + typedef struct { + float Test; + + } __attribute__((packed)) DataFields; + + // Field information + // Field Test information + + + // Constants + static const quint32 OBJID = 2234942498U; + static const QString NAME; + static const QString DESCRIPTION; + static const bool ISSINGLEINST = 1; + static const bool ISSETTINGS = 1; + static const quint32 NUMBYTES = sizeof(DataFields); + + // Functions + FlightPlanSettings(); + + DataFields getData(); + void setData(const DataFields& data); + Metadata getDefaultMetadata(); + UAVDataObject* clone(quint32 instID); + + static FlightPlanSettings* GetInstance(UAVObjectManager* objMngr, quint32 instID = 0); + +private: + DataFields data; + + void setDefaultFieldValues(); + +}; + +#endif // FLIGHTPLANSETTINGS_H diff --git a/ground/src/plugins/uavobjects/flightplansettings.py b/ground/src/plugins/uavobjects/flightplansettings.py new file mode 100644 index 000000000..0ce7898e3 --- /dev/null +++ b/ground/src/plugins/uavobjects/flightplansettings.py @@ -0,0 +1,86 @@ +## +############################################################################## +# +# @file flightplansettings.py +# @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. +# @brief Implementation of the FlightPlanSettings object. This file has been +# automatically generated by the UAVObjectGenerator. +# +# @note Object definition file: flightplansettings.xml. +# This is an automatically generated file. +# DO NOT modify manually. +# +# @see The GNU Public License (GPL) Version 3 +# +#############################################################################/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + + +import uavobject + +import struct +from collections import namedtuple + +# This is a list of instances of the data fields contained in this object +_fields = [ \ + uavobject.UAVObjectField( + 'Test', + 'f', + 1, + [ + '0', + ], + { + } + ), +] + + +class FlightPlanSettings(uavobject.UAVObject): + ## Object constants + OBJID = 2234942498 + NAME = "FlightPlanSettings" + METANAME = "FlightPlanSettingsMeta" + ISSINGLEINST = 1 + ISSETTINGS = 1 + + def __init__(self): + uavobject.UAVObject.__init__(self, + self.OBJID, + self.NAME, + self.METANAME, + 0, + self.ISSINGLEINST) + + for f in _fields: + self.add_field(f) + + def __str__(self): + s = ("0x%08X (%10u) %-30s %3u bytes format '%s'\n" + % (self.OBJID, self.OBJID, self.NAME, self.get_struct().size, self.get_struct().format)) + for f in self.get_tuple()._fields: + s += ("\t%s\n" % f) + return (s) + +def main(): + # Instantiate the object and dump out some interesting info + x = FlightPlanSettings() + print (x) + +if __name__ == "__main__": + #import pdb ; pdb.run('main()') + main() diff --git a/ground/src/plugins/uavobjects/flightplanstatus.cpp b/ground/src/plugins/uavobjects/flightplanstatus.cpp new file mode 100644 index 000000000..0717dfafb --- /dev/null +++ b/ground/src/plugins/uavobjects/flightplanstatus.cpp @@ -0,0 +1,154 @@ +/** + ****************************************************************************** + * + * @file flightplanstatus.cpp + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @see The GNU Public License (GPL) Version 3 + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup UAVObjectsPlugin UAVObjects Plugin + * @{ + * + * @note Object definition file: flightplanstatus.xml. + * This is an automatically generated file. + * DO NOT modify manually. + * + * @brief The UAVUObjects GCS plugin + *****************************************************************************/ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include "flightplanstatus.h" +#include "uavobjectfield.h" + +const QString FlightPlanStatus::NAME = QString("FlightPlanStatus"); +const QString FlightPlanStatus::DESCRIPTION = QString("Status of the flight plan script"); + +/** + * Constructor + */ +FlightPlanStatus::FlightPlanStatus(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAME) +{ + // Create fields + QList fields; + QStringList StatusElemNames; + StatusElemNames.append("0"); + QStringList StatusEnumOptions; + StatusEnumOptions.append("None"); + StatusEnumOptions.append("Running"); + StatusEnumOptions.append("Idle"); + StatusEnumOptions.append("VMInitError"); + StatusEnumOptions.append("ScriptStartError"); + StatusEnumOptions.append("RunTimeError"); + fields.append( new UAVObjectField(QString("Status"), QString(""), UAVObjectField::ENUM, StatusElemNames, StatusEnumOptions) ); + QStringList ErrorTypeElemNames; + ErrorTypeElemNames.append("0"); + QStringList ErrorTypeEnumOptions; + ErrorTypeEnumOptions.append("None"); + fields.append( new UAVObjectField(QString("ErrorType"), QString(""), UAVObjectField::ENUM, ErrorTypeElemNames, ErrorTypeEnumOptions) ); + QStringList ErrorFileIDElemNames; + ErrorFileIDElemNames.append("0"); + fields.append( new UAVObjectField(QString("ErrorFileID"), QString(""), UAVObjectField::UINT32, ErrorFileIDElemNames, QStringList()) ); + QStringList ErrorLineNumElemNames; + ErrorLineNumElemNames.append("0"); + fields.append( new UAVObjectField(QString("ErrorLineNum"), QString(""), UAVObjectField::UINT32, ErrorLineNumElemNames, QStringList()) ); + QStringList DebugElemNames; + DebugElemNames.append("0"); + fields.append( new UAVObjectField(QString("Debug"), QString(""), UAVObjectField::FLOAT32, DebugElemNames, QStringList()) ); + + // Initialize object + initializeFields(fields, (quint8*)&data, NUMBYTES); + // Set the default field values + setDefaultFieldValues(); + // Set the object description + setDescription(DESCRIPTION); +} + +/** + * Get the default metadata for this object + */ +UAVObject::Metadata FlightPlanStatus::getDefaultMetadata() +{ + UAVObject::Metadata metadata; + metadata.flightAccess = ACCESS_READWRITE; + metadata.gcsAccess = ACCESS_READWRITE; + metadata.gcsTelemetryAcked = 0; + metadata.gcsTelemetryUpdateMode = UAVObject::UPDATEMODE_MANUAL; + metadata.gcsTelemetryUpdatePeriod = 0; + metadata.flightTelemetryAcked = 0; + metadata.flightTelemetryUpdateMode = UAVObject::UPDATEMODE_PERIODIC; + metadata.flightTelemetryUpdatePeriod = 2000; + metadata.loggingUpdateMode = UAVObject::UPDATEMODE_NEVER; + metadata.loggingUpdatePeriod = 0; + return metadata; +} + +/** + * Initialize object fields with the default values. + * If a default value is not specified the object fields + * will be initialized to zero. + */ +void FlightPlanStatus::setDefaultFieldValues() +{ + data.Status = 0; + data.ErrorType = 0; + +} + +/** + * Get the object data fields + */ +FlightPlanStatus::DataFields FlightPlanStatus::getData() +{ + QMutexLocker locker(mutex); + return data; +} + +/** + * Set the object data fields + */ +void FlightPlanStatus::setData(const DataFields& data) +{ + QMutexLocker locker(mutex); + // Get metadata + Metadata mdata = getMetadata(); + // Update object if the access mode permits + if ( mdata.gcsAccess == ACCESS_READWRITE ) + { + this->data = data; + emit objectUpdatedAuto(this); // trigger object updated event + emit objectUpdated(this); + } +} + +/** + * Create a clone of this object, a new instance ID must be specified. + * Do not use this function directly to create new instances, the + * UAVObjectManager should be used instead. + */ +UAVDataObject* FlightPlanStatus::clone(quint32 instID) +{ + FlightPlanStatus* obj = new FlightPlanStatus(); + obj->initialize(instID, this->getMetaObject()); + return obj; +} + +/** + * Static function to retrieve an instance of the object. + */ +FlightPlanStatus* FlightPlanStatus::GetInstance(UAVObjectManager* objMngr, quint32 instID) +{ + return dynamic_cast(objMngr->getObject(FlightPlanStatus::OBJID, instID)); +} diff --git a/ground/src/plugins/uavobjects/flightplanstatus.h b/ground/src/plugins/uavobjects/flightplanstatus.h new file mode 100644 index 000000000..53a169a3e --- /dev/null +++ b/ground/src/plugins/uavobjects/flightplanstatus.h @@ -0,0 +1,91 @@ +/** + ****************************************************************************** + * + * @file flightplanstatus.h + * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @see The GNU Public License (GPL) Version 3 + * @addtogroup GCSPlugins GCS Plugins + * @{ + * @addtogroup UAVObjectsPlugin UAVObjects Plugin + * @{ + * + * @note Object definition file: flightplanstatus.xml. + * This is an automatically generated file. + * DO NOT modify manually. + * + * @brief The UAVUObjects GCS plugin + *****************************************************************************/ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef FLIGHTPLANSTATUS_H +#define FLIGHTPLANSTATUS_H + +#include "uavdataobject.h" +#include "uavobjectmanager.h" + +class UAVOBJECTS_EXPORT FlightPlanStatus: public UAVDataObject +{ + Q_OBJECT + +public: + // Field structure + typedef struct { + quint8 Status; + quint8 ErrorType; + quint32 ErrorFileID; + quint32 ErrorLineNum; + float Debug; + + } __attribute__((packed)) DataFields; + + // Field information + // Field Status information + /* Enumeration options for field Status */ + typedef enum { STATUS_NONE=0, STATUS_RUNNING=1, STATUS_IDLE=2, STATUS_VMINITERROR=3, STATUS_SCRIPTSTARTERROR=4, STATUS_RUNTIMEERROR=5 } StatusOptions; + // Field ErrorType information + /* Enumeration options for field ErrorType */ + typedef enum { ERRORTYPE_NONE=0 } ErrorTypeOptions; + // Field ErrorFileID information + // Field ErrorLineNum information + // Field Debug information + + + // Constants + static const quint32 OBJID = 2726772894U; + static const QString NAME; + static const QString DESCRIPTION; + static const bool ISSINGLEINST = 1; + static const bool ISSETTINGS = 0; + static const quint32 NUMBYTES = sizeof(DataFields); + + // Functions + FlightPlanStatus(); + + DataFields getData(); + void setData(const DataFields& data); + Metadata getDefaultMetadata(); + UAVDataObject* clone(quint32 instID); + + static FlightPlanStatus* GetInstance(UAVObjectManager* objMngr, quint32 instID = 0); + +private: + DataFields data; + + void setDefaultFieldValues(); + +}; + +#endif // FLIGHTPLANSTATUS_H diff --git a/ground/src/plugins/uavobjects/flightplanstatus.py b/ground/src/plugins/uavobjects/flightplanstatus.py new file mode 100644 index 000000000..dc92e8626 --- /dev/null +++ b/ground/src/plugins/uavobjects/flightplanstatus.py @@ -0,0 +1,133 @@ +## +############################################################################## +# +# @file flightplanstatus.py +# @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. +# @brief Implementation of the FlightPlanStatus object. This file has been +# automatically generated by the UAVObjectGenerator. +# +# @note Object definition file: flightplanstatus.xml. +# This is an automatically generated file. +# DO NOT modify manually. +# +# @see The GNU Public License (GPL) Version 3 +# +#############################################################################/ +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + + +import uavobject + +import struct +from collections import namedtuple + +# This is a list of instances of the data fields contained in this object +_fields = [ \ + uavobject.UAVObjectField( + 'Status', + 'b', + 1, + [ + '0', + ], + { + '0' : 'None', + '1' : 'Running', + '2' : 'Idle', + '3' : 'VMInitError', + '4' : 'ScriptStartError', + '5' : 'RunTimeError', + } + ), + uavobject.UAVObjectField( + 'ErrorType', + 'b', + 1, + [ + '0', + ], + { + '0' : 'None', + } + ), + uavobject.UAVObjectField( + 'ErrorFileID', + 'I', + 1, + [ + '0', + ], + { + } + ), + uavobject.UAVObjectField( + 'ErrorLineNum', + 'I', + 1, + [ + '0', + ], + { + } + ), + uavobject.UAVObjectField( + 'Debug', + 'f', + 1, + [ + '0', + ], + { + } + ), +] + + +class FlightPlanStatus(uavobject.UAVObject): + ## Object constants + OBJID = 2726772894 + NAME = "FlightPlanStatus" + METANAME = "FlightPlanStatusMeta" + ISSINGLEINST = 1 + ISSETTINGS = 0 + + def __init__(self): + uavobject.UAVObject.__init__(self, + self.OBJID, + self.NAME, + self.METANAME, + 0, + self.ISSINGLEINST) + + for f in _fields: + self.add_field(f) + + def __str__(self): + s = ("0x%08X (%10u) %-30s %3u bytes format '%s'\n" + % (self.OBJID, self.OBJID, self.NAME, self.get_struct().size, self.get_struct().format)) + for f in self.get_tuple()._fields: + s += ("\t%s\n" % f) + return (s) + +def main(): + # Instantiate the object and dump out some interesting info + x = FlightPlanStatus() + print (x) + +if __name__ == "__main__": + #import pdb ; pdb.run('main()') + main() diff --git a/ground/src/plugins/uavobjects/taskinfo.cpp b/ground/src/plugins/uavobjects/taskinfo.cpp index 13c342bfe..0c61621f5 100644 --- a/ground/src/plugins/uavobjects/taskinfo.cpp +++ b/ground/src/plugins/uavobjects/taskinfo.cpp @@ -56,6 +56,7 @@ TaskInfo::TaskInfo(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAME) StackRemainingElemNames.append("Stabilization"); StackRemainingElemNames.append("Guidance"); StackRemainingElemNames.append("Watchdog"); + StackRemainingElemNames.append("FlightPlan"); fields.append( new UAVObjectField(QString("StackRemaining"), QString("bytes"), UAVObjectField::UINT16, StackRemainingElemNames, QStringList()) ); QStringList RunningElemNames; RunningElemNames.append("System"); @@ -70,6 +71,7 @@ TaskInfo::TaskInfo(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, NAME) RunningElemNames.append("Stabilization"); RunningElemNames.append("Guidance"); RunningElemNames.append("Watchdog"); + RunningElemNames.append("FlightPlan"); QStringList RunningEnumOptions; RunningEnumOptions.append("False"); RunningEnumOptions.append("True"); diff --git a/ground/src/plugins/uavobjects/taskinfo.h b/ground/src/plugins/uavobjects/taskinfo.h index d7dc53919..bc30cdb74 100644 --- a/ground/src/plugins/uavobjects/taskinfo.h +++ b/ground/src/plugins/uavobjects/taskinfo.h @@ -43,28 +43,28 @@ class UAVOBJECTS_EXPORT TaskInfo: public UAVDataObject public: // Field structure typedef struct { - quint16 StackRemaining[12]; - quint8 Running[12]; + quint16 StackRemaining[13]; + quint8 Running[13]; } __attribute__((packed)) DataFields; // Field information // Field StackRemaining information /* Array element names for field StackRemaining */ - typedef enum { STACKREMAINING_SYSTEM=0, STACKREMAINING_ACTUATOR=1, STACKREMAINING_TELEMETRYTX=2, STACKREMAINING_TELEMETRYTXPRI=3, STACKREMAINING_TELEMETRYRX=4, STACKREMAINING_GPS=5, STACKREMAINING_MANUALCONTROL=6, STACKREMAINING_ALTITUDE=7, STACKREMAINING_AHRSCOMMS=8, STACKREMAINING_STABILIZATION=9, STACKREMAINING_GUIDANCE=10, STACKREMAINING_WATCHDOG=11 } StackRemainingElem; + typedef enum { STACKREMAINING_SYSTEM=0, STACKREMAINING_ACTUATOR=1, STACKREMAINING_TELEMETRYTX=2, STACKREMAINING_TELEMETRYTXPRI=3, STACKREMAINING_TELEMETRYRX=4, STACKREMAINING_GPS=5, STACKREMAINING_MANUALCONTROL=6, STACKREMAINING_ALTITUDE=7, STACKREMAINING_AHRSCOMMS=8, STACKREMAINING_STABILIZATION=9, STACKREMAINING_GUIDANCE=10, STACKREMAINING_WATCHDOG=11, STACKREMAINING_FLIGHTPLAN=12 } StackRemainingElem; /* Number of elements for field StackRemaining */ - static const quint32 STACKREMAINING_NUMELEM = 12; + static const quint32 STACKREMAINING_NUMELEM = 13; // Field Running information /* Enumeration options for field Running */ typedef enum { RUNNING_FALSE=0, RUNNING_TRUE=1 } RunningOptions; /* Array element names for field Running */ - typedef enum { RUNNING_SYSTEM=0, RUNNING_ACTUATOR=1, RUNNING_TELEMETRYTX=2, RUNNING_TELEMETRYTXPRI=3, RUNNING_TELEMETRYRX=4, RUNNING_GPS=5, RUNNING_MANUALCONTROL=6, RUNNING_ALTITUDE=7, RUNNING_AHRSCOMMS=8, RUNNING_STABILIZATION=9, RUNNING_GUIDANCE=10, RUNNING_WATCHDOG=11 } RunningElem; + typedef enum { RUNNING_SYSTEM=0, RUNNING_ACTUATOR=1, RUNNING_TELEMETRYTX=2, RUNNING_TELEMETRYTXPRI=3, RUNNING_TELEMETRYRX=4, RUNNING_GPS=5, RUNNING_MANUALCONTROL=6, RUNNING_ALTITUDE=7, RUNNING_AHRSCOMMS=8, RUNNING_STABILIZATION=9, RUNNING_GUIDANCE=10, RUNNING_WATCHDOG=11, RUNNING_FLIGHTPLAN=12 } RunningElem; /* Number of elements for field Running */ - static const quint32 RUNNING_NUMELEM = 12; + static const quint32 RUNNING_NUMELEM = 13; // Constants - static const quint32 OBJID = 3297598544U; + static const quint32 OBJID = 1358273008U; static const QString NAME; static const QString DESCRIPTION; static const bool ISSINGLEINST = 1; diff --git a/ground/src/plugins/uavobjects/taskinfo.py b/ground/src/plugins/uavobjects/taskinfo.py index d87deccc9..52a76c5bc 100644 --- a/ground/src/plugins/uavobjects/taskinfo.py +++ b/ground/src/plugins/uavobjects/taskinfo.py @@ -40,7 +40,7 @@ _fields = [ \ uavobject.UAVObjectField( 'StackRemaining', 'H', - 12, + 13, [ 'System', 'Actuator', @@ -54,6 +54,7 @@ _fields = [ \ 'Stabilization', 'Guidance', 'Watchdog', + 'FlightPlan', ], { } @@ -61,7 +62,7 @@ _fields = [ \ uavobject.UAVObjectField( 'Running', 'b', - 12, + 13, [ 'System', 'Actuator', @@ -75,6 +76,7 @@ _fields = [ \ 'Stabilization', 'Guidance', 'Watchdog', + 'FlightPlan', ], { '0' : 'False', @@ -86,7 +88,7 @@ _fields = [ \ class TaskInfo(uavobject.UAVObject): ## Object constants - OBJID = 3297598544 + OBJID = 1358273008 NAME = "TaskInfo" METANAME = "TaskInfoMeta" ISSINGLEINST = 1 diff --git a/ground/src/plugins/uavobjects/uavobjects.pro b/ground/src/plugins/uavobjects/uavobjects.pro index 2406868e1..c62828c70 100644 --- a/ground/src/plugins/uavobjects/uavobjects.pro +++ b/ground/src/plugins/uavobjects/uavobjects.pro @@ -49,7 +49,10 @@ HEADERS += uavobjects_global.h \ pipxtrememodemstatus.h \ i2cstats.h \ batterysettings.h \ - taskinfo.h + taskinfo.h \ + flightplanstatus.h \ + flightplansettings.h \ + flightplancontrol.h SOURCES += uavobject.cpp \ uavmetaobject.cpp \ @@ -96,5 +99,8 @@ SOURCES += uavobject.cpp \ pipxtrememodemstatus.cpp \ i2cstats.cpp \ batterysettings.cpp \ - taskinfo.cpp + taskinfo.cpp \ + flightplanstatus.cpp \ + flightplansettings.cpp \ + flightplancontrol.cpp OTHER_FILES += UAVObjects.pluginspec diff --git a/ground/src/plugins/uavobjects/uavobjectsinit.cpp b/ground/src/plugins/uavobjects/uavobjectsinit.cpp index 4c670ff23..872934093 100644 --- a/ground/src/plugins/uavobjects/uavobjectsinit.cpp +++ b/ground/src/plugins/uavobjects/uavobjectsinit.cpp @@ -43,6 +43,9 @@ #include "batterysettings.h" #include "firmwareiapobj.h" #include "flightbatterystate.h" +#include "flightplancontrol.h" +#include "flightplansettings.h" +#include "flightplanstatus.h" #include "flighttelemetrystats.h" #include "gcstelemetrystats.h" #include "gpsposition.h" @@ -90,6 +93,9 @@ void UAVObjectsInitialize(UAVObjectManager* objMngr) objMngr->registerObject( new BatterySettings() ); objMngr->registerObject( new FirmwareIAPObj() ); objMngr->registerObject( new FlightBatteryState() ); + objMngr->registerObject( new FlightPlanControl() ); + objMngr->registerObject( new FlightPlanSettings() ); + objMngr->registerObject( new FlightPlanStatus() ); objMngr->registerObject( new FlightTelemetryStats() ); objMngr->registerObject( new GCSTelemetryStats() ); objMngr->registerObject( new GPSPosition() ); diff --git a/ground/src/shared/uavobjectdefinition/flightplancontrol.xml b/ground/src/shared/uavobjectdefinition/flightplancontrol.xml new file mode 100644 index 000000000..ce44a5cbe --- /dev/null +++ b/ground/src/shared/uavobjectdefinition/flightplancontrol.xml @@ -0,0 +1,10 @@ + + + Control the flight plan script + + + + + + + diff --git a/ground/src/shared/uavobjectdefinition/flightplansettings.xml b/ground/src/shared/uavobjectdefinition/flightplansettings.xml new file mode 100644 index 000000000..7baf99e3d --- /dev/null +++ b/ground/src/shared/uavobjectdefinition/flightplansettings.xml @@ -0,0 +1,10 @@ + + + Settings for the flight plan module, control the execution of the script + + + + + + + diff --git a/ground/src/shared/uavobjectdefinition/flightplanstatus.xml b/ground/src/shared/uavobjectdefinition/flightplanstatus.xml new file mode 100644 index 000000000..e9f85c012 --- /dev/null +++ b/ground/src/shared/uavobjectdefinition/flightplanstatus.xml @@ -0,0 +1,14 @@ + + + Status of the flight plan script + + + + + + + + + + + diff --git a/ground/src/shared/uavobjectdefinition/taskinfo.xml b/ground/src/shared/uavobjectdefinition/taskinfo.xml index 523376232..1c93e84b1 100644 --- a/ground/src/shared/uavobjectdefinition/taskinfo.xml +++ b/ground/src/shared/uavobjectdefinition/taskinfo.xml @@ -1,8 +1,8 @@ Task information - - + +