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

Remove example objects from the flight code, not needed anymore

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1905 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
edouard 2010-10-06 21:50:57 +00:00 committed by edouard
parent f9c41caaf3
commit 5c48c29612
6 changed files with 0 additions and 641 deletions

View File

@ -1,111 +0,0 @@
/**
******************************************************************************
* @addtogroup UAVObjects OpenPilot UAVObjects
* @{
* @addtogroup ExampleObject1 ExampleObject1
* @brief Example object
*
* Autogenerated files and functions for ExampleObject1 Object
* @{
*
* @file exampleobject1.c
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the ExampleObject1 object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: exampleobject1.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
*/
#include "openpilot.h"
#include "exampleobject1.h"
// Private variables
static UAVObjHandle handle;
// Private functions
static void setDefaults(UAVObjHandle obj, uint16_t instId);
/**
* Initialize object.
* \return 0 Success
* \return -1 Failure
*/
int32_t ExampleObject1Initialize()
{
// Register object with the object manager
handle = UAVObjRegister(EXAMPLEOBJECT1_OBJID, EXAMPLEOBJECT1_NAME, EXAMPLEOBJECT1_METANAME, 0,
EXAMPLEOBJECT1_ISSINGLEINST, EXAMPLEOBJECT1_ISSETTINGS, EXAMPLEOBJECT1_NUMBYTES, &setDefaults);
// Done
if (handle != 0)
{
return 0;
}
else
{
return -1;
}
}
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
static void setDefaults(UAVObjHandle obj, uint16_t instId)
{
ExampleObject1Data data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(ExampleObject1Data));
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.access = ACCESS_READWRITE;
metadata.gcsAccess = ACCESS_READWRITE;
metadata.telemetryAcked = 1;
metadata.telemetryUpdateMode = UPDATEMODE_ONCHANGE;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryAcked = 1;
metadata.gcsTelemetryUpdateMode = UPDATEMODE_PERIODIC;
metadata.gcsTelemetryUpdatePeriod = 500;
metadata.loggingUpdateMode = UPDATEMODE_NEVER;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
/**
* Get object handle
*/
UAVObjHandle ExampleObject1Handle()
{
return handle;
}
/**
* @}
*/

View File

@ -1,111 +0,0 @@
/**
******************************************************************************
* @addtogroup UAVObjects OpenPilot UAVObjects
* @{
* @addtogroup ExampleObject2 ExampleObject2
* @brief Example object
*
* Autogenerated files and functions for ExampleObject2 Object
* @{
*
* @file exampleobject2.c
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the ExampleObject2 object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: exampleobject2.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
*/
#include "openpilot.h"
#include "exampleobject2.h"
// Private variables
static UAVObjHandle handle;
// Private functions
static void setDefaults(UAVObjHandle obj, uint16_t instId);
/**
* Initialize object.
* \return 0 Success
* \return -1 Failure
*/
int32_t ExampleObject2Initialize()
{
// Register object with the object manager
handle = UAVObjRegister(EXAMPLEOBJECT2_OBJID, EXAMPLEOBJECT2_NAME, EXAMPLEOBJECT2_METANAME, 0,
EXAMPLEOBJECT2_ISSINGLEINST, EXAMPLEOBJECT2_ISSETTINGS, EXAMPLEOBJECT2_NUMBYTES, &setDefaults);
// Done
if (handle != 0)
{
return 0;
}
else
{
return -1;
}
}
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
static void setDefaults(UAVObjHandle obj, uint16_t instId)
{
ExampleObject2Data data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(ExampleObject2Data));
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.access = ACCESS_READWRITE;
metadata.gcsAccess = ACCESS_READWRITE;
metadata.telemetryAcked = 1;
metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC;
metadata.telemetryUpdatePeriod = 500;
metadata.gcsTelemetryAcked = 1;
metadata.gcsTelemetryUpdateMode = UPDATEMODE_ONCHANGE;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdateMode = UPDATEMODE_NEVER;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
/**
* Get object handle
*/
UAVObjHandle ExampleObject2Handle()
{
return handle;
}
/**
* @}
*/

View File

@ -1,114 +0,0 @@
/**
******************************************************************************
* @addtogroup UAVObjects OpenPilot UAVObjects
* @{
* @addtogroup ExampleSettings ExampleSettings
* @brief Example settings object
*
* Autogenerated files and functions for ExampleSettings Object
* @{
*
* @file examplesettings.c
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the ExampleSettings object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: examplesettings.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
*/
#include "openpilot.h"
#include "examplesettings.h"
// Private variables
static UAVObjHandle handle;
// Private functions
static void setDefaults(UAVObjHandle obj, uint16_t instId);
/**
* Initialize object.
* \return 0 Success
* \return -1 Failure
*/
int32_t ExampleSettingsInitialize()
{
// Register object with the object manager
handle = UAVObjRegister(EXAMPLESETTINGS_OBJID, EXAMPLESETTINGS_NAME, EXAMPLESETTINGS_METANAME, 0,
EXAMPLESETTINGS_ISSINGLEINST, EXAMPLESETTINGS_ISSETTINGS, EXAMPLESETTINGS_NUMBYTES, &setDefaults);
// Done
if (handle != 0)
{
return 0;
}
else
{
return -1;
}
}
/**
* Initialize object fields and metadata with the default values.
* If a default value is not specified the object fields
* will be initialized to zero.
*/
static void setDefaults(UAVObjHandle obj, uint16_t instId)
{
ExampleSettingsData data;
UAVObjMetadata metadata;
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(ExampleSettingsData));
data.UpdatePeriod = 10;
data.StepSize = 1;
data.StepDirection = 0;
UAVObjSetInstanceData(obj, instId, &data);
// Initialize object metadata to their default values
metadata.access = ACCESS_READWRITE;
metadata.gcsAccess = ACCESS_READWRITE;
metadata.telemetryAcked = 1;
metadata.telemetryUpdateMode = UPDATEMODE_ONCHANGE;
metadata.telemetryUpdatePeriod = 0;
metadata.gcsTelemetryAcked = 1;
metadata.gcsTelemetryUpdateMode = UPDATEMODE_ONCHANGE;
metadata.gcsTelemetryUpdatePeriod = 0;
metadata.loggingUpdateMode = UPDATEMODE_NEVER;
metadata.loggingUpdatePeriod = 0;
UAVObjSetMetadata(obj, &metadata);
}
/**
* Get object handle
*/
UAVObjHandle ExampleSettingsHandle()
{
return handle;
}
/**
* @}
*/

View File

@ -1,109 +0,0 @@
/**
******************************************************************************
* @addtogroup UAVObjects OpenPilot UAVObjects
* @{
* @addtogroup ExampleObject1 ExampleObject1
* @brief Example object
*
* Autogenerated files and functions for ExampleObject1 Object
* @{
*
* @file exampleobject1.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the ExampleObject1 object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: exampleobject1.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
*/
#ifndef EXAMPLEOBJECT1_H
#define EXAMPLEOBJECT1_H
// Object constants
#define EXAMPLEOBJECT1_OBJID 3852936276U
#define EXAMPLEOBJECT1_NAME "ExampleObject1"
#define EXAMPLEOBJECT1_METANAME "ExampleObject1Meta"
#define EXAMPLEOBJECT1_ISSINGLEINST 0
#define EXAMPLEOBJECT1_ISSETTINGS 0
#define EXAMPLEOBJECT1_NUMBYTES sizeof(ExampleObject1Data)
// Object access macros
/**
* @function ExampleObject1Get(dataOut)
* @brief Populate a ExampleObject1Data object
* @param[out] dataOut
*/
#define ExampleObject1Get(dataOut) UAVObjGetData(ExampleObject1Handle(), dataOut)
#define ExampleObject1Set(dataIn) UAVObjSetData(ExampleObject1Handle(), dataIn)
#define ExampleObject1InstGet(instId, dataOut) UAVObjGetInstanceData(ExampleObject1Handle(), instId, dataOut)
#define ExampleObject1InstSet(instId, dataIn) UAVObjSetInstanceData(ExampleObject1Handle(), instId, dataIn)
#define ExampleObject1ConnectQueue(queue) UAVObjConnectQueue(ExampleObject1Handle(), queue, EV_MASK_ALL_UPDATES)
#define ExampleObject1ConnectCallback(cb) UAVObjConnectCallback(ExampleObject1Handle(), cb, EV_MASK_ALL_UPDATES)
#define ExampleObject1CreateInstance() UAVObjCreateInstance(ExampleObject1Handle())
#define ExampleObject1RequestUpdate() UAVObjRequestUpdate(ExampleObject1Handle())
#define ExampleObject1RequestInstUpdate(instId) UAVObjRequestInstanceUpdate(ExampleObject1Handle(), instId)
#define ExampleObject1Updated() UAVObjUpdated(ExampleObject1Handle())
#define ExampleObject1InstUpdated(instId) UAVObjUpdated(ExampleObject1Handle(), instId)
#define ExampleObject1GetMetadata(dataOut) UAVObjGetMetadata(ExampleObject1Handle(), dataOut)
#define ExampleObject1SetMetadata(dataIn) UAVObjSetMetadata(ExampleObject1Handle(), dataIn)
#define ExampleObject1ReadOnly(dataIn) UAVObjReadOnly(ExampleObject1Handle())
// Object data
typedef struct {
int8_t Field1;
int16_t Field2;
int32_t Field3;
float Field4[4];
uint8_t Field5;
uint16_t Field6;
uint32_t Field7;
uint8_t Field8;
} __attribute__((packed)) ExampleObject1Data;
// Field information
// Field Field1 information
// Field Field2 information
// Field Field3 information
// Field Field4 information
/* Number of elements for field Field4 */
#define EXAMPLEOBJECT1_FIELD4_NUMELEM 4
// Field Field5 information
// Field Field6 information
// Field Field7 information
// Field Field8 information
/* Enumeration options for field Field8 */
typedef enum { EXAMPLEOBJECT1_FIELD8_OPTION1=0, EXAMPLEOBJECT1_FIELD8_OPTION2=1 } ExampleObject1Field8Options;
// Generic interface functions
int32_t ExampleObject1Initialize();
UAVObjHandle ExampleObject1Handle();
#endif // EXAMPLEOBJECT1_H
/**
* @}
* @}
*/

View File

@ -1,99 +0,0 @@
/**
******************************************************************************
* @addtogroup UAVObjects OpenPilot UAVObjects
* @{
* @addtogroup ExampleObject2 ExampleObject2
* @brief Example object
*
* Autogenerated files and functions for ExampleObject2 Object
* @{
*
* @file exampleobject2.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the ExampleObject2 object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: exampleobject2.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
*/
#ifndef EXAMPLEOBJECT2_H
#define EXAMPLEOBJECT2_H
// Object constants
#define EXAMPLEOBJECT2_OBJID 2743296914U
#define EXAMPLEOBJECT2_NAME "ExampleObject2"
#define EXAMPLEOBJECT2_METANAME "ExampleObject2Meta"
#define EXAMPLEOBJECT2_ISSINGLEINST 0
#define EXAMPLEOBJECT2_ISSETTINGS 0
#define EXAMPLEOBJECT2_NUMBYTES sizeof(ExampleObject2Data)
// Object access macros
/**
* @function ExampleObject2Get(dataOut)
* @brief Populate a ExampleObject2Data object
* @param[out] dataOut
*/
#define ExampleObject2Get(dataOut) UAVObjGetData(ExampleObject2Handle(), dataOut)
#define ExampleObject2Set(dataIn) UAVObjSetData(ExampleObject2Handle(), dataIn)
#define ExampleObject2InstGet(instId, dataOut) UAVObjGetInstanceData(ExampleObject2Handle(), instId, dataOut)
#define ExampleObject2InstSet(instId, dataIn) UAVObjSetInstanceData(ExampleObject2Handle(), instId, dataIn)
#define ExampleObject2ConnectQueue(queue) UAVObjConnectQueue(ExampleObject2Handle(), queue, EV_MASK_ALL_UPDATES)
#define ExampleObject2ConnectCallback(cb) UAVObjConnectCallback(ExampleObject2Handle(), cb, EV_MASK_ALL_UPDATES)
#define ExampleObject2CreateInstance() UAVObjCreateInstance(ExampleObject2Handle())
#define ExampleObject2RequestUpdate() UAVObjRequestUpdate(ExampleObject2Handle())
#define ExampleObject2RequestInstUpdate(instId) UAVObjRequestInstanceUpdate(ExampleObject2Handle(), instId)
#define ExampleObject2Updated() UAVObjUpdated(ExampleObject2Handle())
#define ExampleObject2InstUpdated(instId) UAVObjUpdated(ExampleObject2Handle(), instId)
#define ExampleObject2GetMetadata(dataOut) UAVObjGetMetadata(ExampleObject2Handle(), dataOut)
#define ExampleObject2SetMetadata(dataIn) UAVObjSetMetadata(ExampleObject2Handle(), dataIn)
#define ExampleObject2ReadOnly(dataIn) UAVObjReadOnly(ExampleObject2Handle())
// Object data
typedef struct {
int8_t Field1;
int16_t Field2;
int32_t Field3;
float Field4[4];
} __attribute__((packed)) ExampleObject2Data;
// Field information
// Field Field1 information
// Field Field2 information
// Field Field3 information
// Field Field4 information
/* Number of elements for field Field4 */
#define EXAMPLEOBJECT2_FIELD4_NUMELEM 4
// Generic interface functions
int32_t ExampleObject2Initialize();
UAVObjHandle ExampleObject2Handle();
#endif // EXAMPLEOBJECT2_H
/**
* @}
* @}
*/

View File

@ -1,97 +0,0 @@
/**
******************************************************************************
* @addtogroup UAVObjects OpenPilot UAVObjects
* @{
* @addtogroup ExampleSettings ExampleSettings
* @brief Example settings object
*
* Autogenerated files and functions for ExampleSettings Object
* @{
*
* @file examplesettings.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @brief Implementation of the ExampleSettings object. This file has been
* automatically generated by the UAVObjectGenerator.
*
* @note Object definition file: examplesettings.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
*/
#ifndef EXAMPLESETTINGS_H
#define EXAMPLESETTINGS_H
// Object constants
#define EXAMPLESETTINGS_OBJID 1640607828U
#define EXAMPLESETTINGS_NAME "ExampleSettings"
#define EXAMPLESETTINGS_METANAME "ExampleSettingsMeta"
#define EXAMPLESETTINGS_ISSINGLEINST 1
#define EXAMPLESETTINGS_ISSETTINGS 1
#define EXAMPLESETTINGS_NUMBYTES sizeof(ExampleSettingsData)
// Object access macros
/**
* @function ExampleSettingsGet(dataOut)
* @brief Populate a ExampleSettingsData object
* @param[out] dataOut
*/
#define ExampleSettingsGet(dataOut) UAVObjGetData(ExampleSettingsHandle(), dataOut)
#define ExampleSettingsSet(dataIn) UAVObjSetData(ExampleSettingsHandle(), dataIn)
#define ExampleSettingsInstGet(instId, dataOut) UAVObjGetInstanceData(ExampleSettingsHandle(), instId, dataOut)
#define ExampleSettingsInstSet(instId, dataIn) UAVObjSetInstanceData(ExampleSettingsHandle(), instId, dataIn)
#define ExampleSettingsConnectQueue(queue) UAVObjConnectQueue(ExampleSettingsHandle(), queue, EV_MASK_ALL_UPDATES)
#define ExampleSettingsConnectCallback(cb) UAVObjConnectCallback(ExampleSettingsHandle(), cb, EV_MASK_ALL_UPDATES)
#define ExampleSettingsCreateInstance() UAVObjCreateInstance(ExampleSettingsHandle())
#define ExampleSettingsRequestUpdate() UAVObjRequestUpdate(ExampleSettingsHandle())
#define ExampleSettingsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(ExampleSettingsHandle(), instId)
#define ExampleSettingsUpdated() UAVObjUpdated(ExampleSettingsHandle())
#define ExampleSettingsInstUpdated(instId) UAVObjUpdated(ExampleSettingsHandle(), instId)
#define ExampleSettingsGetMetadata(dataOut) UAVObjGetMetadata(ExampleSettingsHandle(), dataOut)
#define ExampleSettingsSetMetadata(dataIn) UAVObjSetMetadata(ExampleSettingsHandle(), dataIn)
#define ExampleSettingsReadOnly(dataIn) UAVObjReadOnly(ExampleSettingsHandle())
// Object data
typedef struct {
int32_t UpdatePeriod;
int32_t StepSize;
uint8_t StepDirection;
} __attribute__((packed)) ExampleSettingsData;
// Field information
// Field UpdatePeriod information
// Field StepSize information
// Field StepDirection information
/* Enumeration options for field StepDirection */
typedef enum { EXAMPLESETTINGS_STEPDIRECTION_UP=0, EXAMPLESETTINGS_STEPDIRECTION_DOWN=1 } ExampleSettingsStepDirectionOptions;
// Generic interface functions
int32_t ExampleSettingsInitialize();
UAVObjHandle ExampleSettingsHandle();
#endif // EXAMPLESETTINGS_H
/**
* @}
* @}
*/