mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
d71e9df8c5
worlking again git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1869 ebee16cc-31ac-478f-84a7-5cbb03baadba
138 lines
6.6 KiB
C
138 lines
6.6 KiB
C
/**
|
|
******************************************************************************
|
|
* @addtogroup UAVObjects OpenPilot UAVObjects
|
|
* @{
|
|
* @addtogroup LesStabilizationSettings LesStabilizationSettings
|
|
* @brief PID settings used by the Stabilization module to combine the @ref AttitudeActual and @ref AttitudeDesired to compute @ref ActuatorDesired
|
|
*
|
|
* Autogenerated files and functions for LesStabilizationSettings Object
|
|
|
|
* @{
|
|
*
|
|
* @file lesstabilizationsettings.h
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
* @brief Implementation of the LesStabilizationSettings object. This file has been
|
|
* automatically generated by the UAVObjectGenerator.
|
|
*
|
|
* @note Object definition file: lesstabilizationsettings.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 LESSTABILIZATIONSETTINGS_H
|
|
#define LESSTABILIZATIONSETTINGS_H
|
|
|
|
// Object constants
|
|
#define LESSTABILIZATIONSETTINGS_OBJID 2839831188U
|
|
#define LESSTABILIZATIONSETTINGS_NAME "LesStabilizationSettings"
|
|
#define LESSTABILIZATIONSETTINGS_METANAME "LesStabilizationSettingsMeta"
|
|
#define LESSTABILIZATIONSETTINGS_ISSINGLEINST 1
|
|
#define LESSTABILIZATIONSETTINGS_ISSETTINGS 1
|
|
#define LESSTABILIZATIONSETTINGS_NUMBYTES sizeof(LesStabilizationSettingsData)
|
|
|
|
// Object access macros
|
|
/**
|
|
* @function LesStabilizationSettingsGet(dataOut)
|
|
* @brief Populate a LesStabilizationSettingsData object
|
|
* @param[out] dataOut
|
|
*/
|
|
#define LesStabilizationSettingsGet(dataOut) UAVObjGetData(LesStabilizationSettingsHandle(), dataOut)
|
|
#define LesStabilizationSettingsSet(dataIn) UAVObjSetData(LesStabilizationSettingsHandle(), dataIn)
|
|
#define LesStabilizationSettingsInstGet(instId, dataOut) UAVObjGetInstanceData(LesStabilizationSettingsHandle(), instId, dataOut)
|
|
#define LesStabilizationSettingsInstSet(instId, dataIn) UAVObjSetInstanceData(LesStabilizationSettingsHandle(), instId, dataIn)
|
|
#define LesStabilizationSettingsConnectQueue(queue) UAVObjConnectQueue(LesStabilizationSettingsHandle(), queue, EV_MASK_ALL_UPDATES)
|
|
#define LesStabilizationSettingsConnectCallback(cb) UAVObjConnectCallback(LesStabilizationSettingsHandle(), cb, EV_MASK_ALL_UPDATES)
|
|
#define LesStabilizationSettingsCreateInstance() UAVObjCreateInstance(LesStabilizationSettingsHandle())
|
|
#define LesStabilizationSettingsRequestUpdate() UAVObjRequestUpdate(LesStabilizationSettingsHandle())
|
|
#define LesStabilizationSettingsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(LesStabilizationSettingsHandle(), instId)
|
|
#define LesStabilizationSettingsUpdated() UAVObjUpdated(LesStabilizationSettingsHandle())
|
|
#define LesStabilizationSettingsInstUpdated(instId) UAVObjUpdated(LesStabilizationSettingsHandle(), instId)
|
|
#define LesStabilizationSettingsGetMetadata(dataOut) UAVObjGetMetadata(LesStabilizationSettingsHandle(), dataOut)
|
|
#define LesStabilizationSettingsSetMetadata(dataIn) UAVObjSetMetadata(LesStabilizationSettingsHandle(), dataIn)
|
|
#define LesStabilizationSettingsReadOnly(dataIn) UAVObjReadOnly(LesStabilizationSettingsHandle())
|
|
|
|
// Object data
|
|
typedef struct {
|
|
uint8_t UpdatePeriod;
|
|
uint8_t RollMax;
|
|
uint8_t PitchMax;
|
|
uint8_t YawMax;
|
|
uint8_t YawMode;
|
|
float ManualYawRate;
|
|
float MaximumRate[3];
|
|
float RollRateP;
|
|
float PitchRateP;
|
|
float YawRatePI[3];
|
|
float RollPI[3];
|
|
float PitchPI[3];
|
|
float YawPI[3];
|
|
|
|
} __attribute__((packed)) LesStabilizationSettingsData;
|
|
|
|
// Field information
|
|
// Field UpdatePeriod information
|
|
// Field RollMax information
|
|
// Field PitchMax information
|
|
// Field YawMax information
|
|
// Field YawMode information
|
|
/* Enumeration options for field YawMode */
|
|
typedef enum { LESSTABILIZATIONSETTINGS_YAWMODE_RATE=0, LESSTABILIZATIONSETTINGS_YAWMODE_HEADING=1 } LesStabilizationSettingsYawModeOptions;
|
|
// Field ManualYawRate information
|
|
// Field MaximumRate information
|
|
/* Array element names for field MaximumRate */
|
|
typedef enum { LESSTABILIZATIONSETTINGS_MAXIMUMRATE_ROLL=0, LESSTABILIZATIONSETTINGS_MAXIMUMRATE_PITCH=1, LESSTABILIZATIONSETTINGS_MAXIMUMRATE_YAW=2 } LesStabilizationSettingsMaximumRateElem;
|
|
/* Number of elements for field MaximumRate */
|
|
#define LESSTABILIZATIONSETTINGS_MAXIMUMRATE_NUMELEM 3
|
|
// Field RollRateP information
|
|
// Field PitchRateP information
|
|
// Field YawRatePI information
|
|
/* Array element names for field YawRatePI */
|
|
typedef enum { LESSTABILIZATIONSETTINGS_YAWRATEPI_KP=0, LESSTABILIZATIONSETTINGS_YAWRATEPI_KI=1, LESSTABILIZATIONSETTINGS_YAWRATEPI_ILIMIT=2 } LesStabilizationSettingsYawRatePIElem;
|
|
/* Number of elements for field YawRatePI */
|
|
#define LESSTABILIZATIONSETTINGS_YAWRATEPI_NUMELEM 3
|
|
// Field RollPI information
|
|
/* Array element names for field RollPI */
|
|
typedef enum { LESSTABILIZATIONSETTINGS_ROLLPI_KP=0, LESSTABILIZATIONSETTINGS_ROLLPI_KI=1, LESSTABILIZATIONSETTINGS_ROLLPI_ILIMIT=2 } LesStabilizationSettingsRollPIElem;
|
|
/* Number of elements for field RollPI */
|
|
#define LESSTABILIZATIONSETTINGS_ROLLPI_NUMELEM 3
|
|
// Field PitchPI information
|
|
/* Array element names for field PitchPI */
|
|
typedef enum { LESSTABILIZATIONSETTINGS_PITCHPI_KP=0, LESSTABILIZATIONSETTINGS_PITCHPI_KI=1, LESSTABILIZATIONSETTINGS_PITCHPI_ILIMIT=2 } LesStabilizationSettingsPitchPIElem;
|
|
/* Number of elements for field PitchPI */
|
|
#define LESSTABILIZATIONSETTINGS_PITCHPI_NUMELEM 3
|
|
// Field YawPI information
|
|
/* Array element names for field YawPI */
|
|
typedef enum { LESSTABILIZATIONSETTINGS_YAWPI_KP=0, LESSTABILIZATIONSETTINGS_YAWPI_KI=1, LESSTABILIZATIONSETTINGS_YAWPI_ILIMIT=2 } LesStabilizationSettingsYawPIElem;
|
|
/* Number of elements for field YawPI */
|
|
#define LESSTABILIZATIONSETTINGS_YAWPI_NUMELEM 3
|
|
|
|
|
|
// Generic interface functions
|
|
int32_t LesStabilizationSettingsInitialize();
|
|
UAVObjHandle LesStabilizationSettingsHandle();
|
|
|
|
#endif // LESSTABILIZATIONSETTINGS_H
|
|
|
|
/**
|
|
* @}
|
|
* @}
|
|
*/
|