/** ****************************************************************************** * @addtogroup UAVObjects OpenPilot UAVObjects * @{ * @addtogroup StabilizationSettings StabilizationSettings * @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 StabilizationSettings Object * @{ * * @file stabilizationsettings.h * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @brief Implementation of the StabilizationSettings object. This file has been * automatically generated by the UAVObjectGenerator. * * @note Object definition file: stabilizationsettings.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 STABILIZATIONSETTINGS_H #define STABILIZATIONSETTINGS_H // Object constants #define STABILIZATIONSETTINGS_OBJID 3792991236U #define STABILIZATIONSETTINGS_NAME "StabilizationSettings" #define STABILIZATIONSETTINGS_METANAME "StabilizationSettingsMeta" #define STABILIZATIONSETTINGS_ISSINGLEINST 1 #define STABILIZATIONSETTINGS_ISSETTINGS 1 #define STABILIZATIONSETTINGS_NUMBYTES sizeof(StabilizationSettingsData) // Object access macros /** * @function StabilizationSettingsGet(dataOut) * @brief Populate a StabilizationSettingsData object * @param[out] dataOut */ #define StabilizationSettingsGet(dataOut) UAVObjGetData(StabilizationSettingsHandle(), dataOut) #define StabilizationSettingsSet(dataIn) UAVObjSetData(StabilizationSettingsHandle(), dataIn) #define StabilizationSettingsInstGet(instId, dataOut) UAVObjGetInstanceData(StabilizationSettingsHandle(), instId, dataOut) #define StabilizationSettingsInstSet(instId, dataIn) UAVObjSetInstanceData(StabilizationSettingsHandle(), instId, dataIn) #define StabilizationSettingsConnectQueue(queue) UAVObjConnectQueue(StabilizationSettingsHandle(), queue, EV_MASK_ALL_UPDATES) #define StabilizationSettingsConnectCallback(cb) UAVObjConnectCallback(StabilizationSettingsHandle(), cb, EV_MASK_ALL_UPDATES) #define StabilizationSettingsCreateInstance() UAVObjCreateInstance(StabilizationSettingsHandle()) #define StabilizationSettingsRequestUpdate() UAVObjRequestUpdate(StabilizationSettingsHandle()) #define StabilizationSettingsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(StabilizationSettingsHandle(), instId) #define StabilizationSettingsUpdated() UAVObjUpdated(StabilizationSettingsHandle()) #define StabilizationSettingsInstUpdated(instId) UAVObjUpdated(StabilizationSettingsHandle(), instId) #define StabilizationSettingsGetMetadata(dataOut) UAVObjGetMetadata(StabilizationSettingsHandle(), dataOut) #define StabilizationSettingsSetMetadata(dataIn) UAVObjSetMetadata(StabilizationSettingsHandle(), dataIn) #define StabilizationSettingsReadOnly(dataIn) UAVObjReadOnly(StabilizationSettingsHandle()) // Object data typedef struct { uint8_t RollMax; uint8_t PitchMax; uint8_t YawMax; float ManualRate[3]; float MaximumRate[3]; float RollRatePI[3]; float PitchRatePI[3]; float YawRatePI[3]; float RollPI[3]; float PitchPI[3]; float YawPI[3]; } __attribute__((packed)) StabilizationSettingsData; // Field information // Field RollMax information // Field PitchMax information // Field YawMax information // Field ManualRate information /* Array element names for field ManualRate */ typedef enum { STABILIZATIONSETTINGS_MANUALRATE_ROLL=0, STABILIZATIONSETTINGS_MANUALRATE_PITCH=1, STABILIZATIONSETTINGS_MANUALRATE_YAW=2 } StabilizationSettingsManualRateElem; /* Number of elements for field ManualRate */ #define STABILIZATIONSETTINGS_MANUALRATE_NUMELEM 3 // Field MaximumRate information /* Array element names for field MaximumRate */ typedef enum { STABILIZATIONSETTINGS_MAXIMUMRATE_ROLL=0, STABILIZATIONSETTINGS_MAXIMUMRATE_PITCH=1, STABILIZATIONSETTINGS_MAXIMUMRATE_YAW=2 } StabilizationSettingsMaximumRateElem; /* Number of elements for field MaximumRate */ #define STABILIZATIONSETTINGS_MAXIMUMRATE_NUMELEM 3 // Field RollRatePI information /* Array element names for field RollRatePI */ typedef enum { STABILIZATIONSETTINGS_ROLLRATEPI_KP=0, STABILIZATIONSETTINGS_ROLLRATEPI_KI=1, STABILIZATIONSETTINGS_ROLLRATEPI_ILIMIT=2 } StabilizationSettingsRollRatePIElem; /* Number of elements for field RollRatePI */ #define STABILIZATIONSETTINGS_ROLLRATEPI_NUMELEM 3 // Field PitchRatePI information /* Array element names for field PitchRatePI */ typedef enum { STABILIZATIONSETTINGS_PITCHRATEPI_KP=0, STABILIZATIONSETTINGS_PITCHRATEPI_KI=1, STABILIZATIONSETTINGS_PITCHRATEPI_ILIMIT=2 } StabilizationSettingsPitchRatePIElem; /* Number of elements for field PitchRatePI */ #define STABILIZATIONSETTINGS_PITCHRATEPI_NUMELEM 3 // Field YawRatePI information /* Array element names for field YawRatePI */ typedef enum { STABILIZATIONSETTINGS_YAWRATEPI_KP=0, STABILIZATIONSETTINGS_YAWRATEPI_KI=1, STABILIZATIONSETTINGS_YAWRATEPI_ILIMIT=2 } StabilizationSettingsYawRatePIElem; /* Number of elements for field YawRatePI */ #define STABILIZATIONSETTINGS_YAWRATEPI_NUMELEM 3 // Field RollPI information /* Array element names for field RollPI */ typedef enum { STABILIZATIONSETTINGS_ROLLPI_KP=0, STABILIZATIONSETTINGS_ROLLPI_KI=1, STABILIZATIONSETTINGS_ROLLPI_ILIMIT=2 } StabilizationSettingsRollPIElem; /* Number of elements for field RollPI */ #define STABILIZATIONSETTINGS_ROLLPI_NUMELEM 3 // Field PitchPI information /* Array element names for field PitchPI */ typedef enum { STABILIZATIONSETTINGS_PITCHPI_KP=0, STABILIZATIONSETTINGS_PITCHPI_KI=1, STABILIZATIONSETTINGS_PITCHPI_ILIMIT=2 } StabilizationSettingsPitchPIElem; /* Number of elements for field PitchPI */ #define STABILIZATIONSETTINGS_PITCHPI_NUMELEM 3 // Field YawPI information /* Array element names for field YawPI */ typedef enum { STABILIZATIONSETTINGS_YAWPI_KP=0, STABILIZATIONSETTINGS_YAWPI_KI=1, STABILIZATIONSETTINGS_YAWPI_ILIMIT=2 } StabilizationSettingsYawPIElem; /* Number of elements for field YawPI */ #define STABILIZATIONSETTINGS_YAWPI_NUMELEM 3 // Generic interface functions int32_t StabilizationSettingsInitialize(); UAVObjHandle StabilizationSettingsHandle(); #endif // STABILIZATIONSETTINGS_H /** * @} * @} */