/** ****************************************************************************** * @addtogroup UAVObjects OpenPilot UAVObjects * @{ * @addtogroup MixerSettings MixerSettings * @brief Settings for the @ref ActuatorModule that controls the channel assignments for the mixer based on AircraftType * * Autogenerated files and functions for MixerSettings Object * @{ * * @file mixersettings.h * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @brief Implementation of the MixerSettings object. This file has been * automatically generated by the UAVObjectGenerator. * * @note Object definition file: mixersettings.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 MIXERSETTINGS_H #define MIXERSETTINGS_H // Object constants #define MIXERSETTINGS_OBJID 1614220618U #define MIXERSETTINGS_NAME "MixerSettings" #define MIXERSETTINGS_METANAME "MixerSettingsMeta" #define MIXERSETTINGS_ISSINGLEINST 1 #define MIXERSETTINGS_ISSETTINGS 1 #define MIXERSETTINGS_NUMBYTES sizeof(MixerSettingsData) // Object access macros /** * @function MixerSettingsGet(dataOut) * @brief Populate a MixerSettingsData object * @param[out] dataOut */ #define MixerSettingsGet(dataOut) UAVObjGetData(MixerSettingsHandle(), dataOut) #define MixerSettingsSet(dataIn) UAVObjSetData(MixerSettingsHandle(), dataIn) #define MixerSettingsInstGet(instId, dataOut) UAVObjGetInstanceData(MixerSettingsHandle(), instId, dataOut) #define MixerSettingsInstSet(instId, dataIn) UAVObjSetInstanceData(MixerSettingsHandle(), instId, dataIn) #define MixerSettingsConnectQueue(queue) UAVObjConnectQueue(MixerSettingsHandle(), queue, EV_MASK_ALL_UPDATES) #define MixerSettingsConnectCallback(cb) UAVObjConnectCallback(MixerSettingsHandle(), cb, EV_MASK_ALL_UPDATES) #define MixerSettingsCreateInstance() UAVObjCreateInstance(MixerSettingsHandle()) #define MixerSettingsRequestUpdate() UAVObjRequestUpdate(MixerSettingsHandle()) #define MixerSettingsRequestInstUpdate(instId) UAVObjRequestInstanceUpdate(MixerSettingsHandle(), instId) #define MixerSettingsUpdated() UAVObjUpdated(MixerSettingsHandle()) #define MixerSettingsInstUpdated(instId) UAVObjUpdated(MixerSettingsHandle(), instId) #define MixerSettingsGetMetadata(dataOut) UAVObjGetMetadata(MixerSettingsHandle(), dataOut) #define MixerSettingsSetMetadata(dataIn) UAVObjSetMetadata(MixerSettingsHandle(), dataIn) #define MixerSettingsReadOnly(dataIn) UAVObjReadOnly(MixerSettingsHandle()) // Object data typedef struct { float MaxAccel; float FeedForward; float AccelTime; float DecelTime; float ThrottleCurve1[5]; float ThrottleCurve2[5]; uint8_t Mixer0Type; float Mixer0Matrix[5]; uint8_t Mixer1Type; float Mixer1Matrix[5]; uint8_t Mixer2Type; float Mixer2Matrix[5]; uint8_t Mixer3Type; float Mixer3Matrix[5]; uint8_t Mixer4Type; float Mixer4Matrix[5]; uint8_t Mixer5Type; float Mixer5Matrix[5]; uint8_t Mixer6Type; float Mixer6Matrix[5]; uint8_t Mixer7Type; float Mixer7Matrix[5]; } __attribute__((packed)) MixerSettingsData; // Field information // Field MaxAccel information // Field FeedForward information // Field AccelTime information // Field DecelTime information // Field ThrottleCurve1 information /* Array element names for field ThrottleCurve1 */ typedef enum { MIXERSETTINGS_THROTTLECURVE1_0=0, MIXERSETTINGS_THROTTLECURVE1_25=1, MIXERSETTINGS_THROTTLECURVE1_50=2, MIXERSETTINGS_THROTTLECURVE1_75=3, MIXERSETTINGS_THROTTLECURVE1_100=4 } MixerSettingsThrottleCurve1Elem; /* Number of elements for field ThrottleCurve1 */ #define MIXERSETTINGS_THROTTLECURVE1_NUMELEM 5 // Field ThrottleCurve2 information /* Array element names for field ThrottleCurve2 */ typedef enum { MIXERSETTINGS_THROTTLECURVE2_0=0, MIXERSETTINGS_THROTTLECURVE2_25=1, MIXERSETTINGS_THROTTLECURVE2_50=2, MIXERSETTINGS_THROTTLECURVE2_75=3, MIXERSETTINGS_THROTTLECURVE2_100=4 } MixerSettingsThrottleCurve2Elem; /* Number of elements for field ThrottleCurve2 */ #define MIXERSETTINGS_THROTTLECURVE2_NUMELEM 5 // Field Mixer0Type information /* Enumeration options for field Mixer0Type */ typedef enum { MIXERSETTINGS_MIXER0TYPE_DISABLED=0, MIXERSETTINGS_MIXER0TYPE_MOTOR=1, MIXERSETTINGS_MIXER0TYPE_SERVO=2 } MixerSettingsMixer0TypeOptions; // Field Mixer0Matrix information /* Array element names for field Mixer0Matrix */ typedef enum { MIXERSETTINGS_MIXER0MATRIX_THROTTLECURVE1=0, MIXERSETTINGS_MIXER0MATRIX_THROTTLECURVE2=1, MIXERSETTINGS_MIXER0MATRIX_ROLL=2, MIXERSETTINGS_MIXER0MATRIX_PITCH=3, MIXERSETTINGS_MIXER0MATRIX_YAW=4 } MixerSettingsMixer0MatrixElem; /* Number of elements for field Mixer0Matrix */ #define MIXERSETTINGS_MIXER0MATRIX_NUMELEM 5 // Field Mixer1Type information /* Enumeration options for field Mixer1Type */ typedef enum { MIXERSETTINGS_MIXER1TYPE_DISABLED=0, MIXERSETTINGS_MIXER1TYPE_MOTOR=1, MIXERSETTINGS_MIXER1TYPE_SERVO=2 } MixerSettingsMixer1TypeOptions; // Field Mixer1Matrix information /* Array element names for field Mixer1Matrix */ typedef enum { MIXERSETTINGS_MIXER1MATRIX_THROTTLECURVE1=0, MIXERSETTINGS_MIXER1MATRIX_THROTTLECURVE2=1, MIXERSETTINGS_MIXER1MATRIX_ROLL=2, MIXERSETTINGS_MIXER1MATRIX_PITCH=3, MIXERSETTINGS_MIXER1MATRIX_YAW=4 } MixerSettingsMixer1MatrixElem; /* Number of elements for field Mixer1Matrix */ #define MIXERSETTINGS_MIXER1MATRIX_NUMELEM 5 // Field Mixer2Type information /* Enumeration options for field Mixer2Type */ typedef enum { MIXERSETTINGS_MIXER2TYPE_DISABLED=0, MIXERSETTINGS_MIXER2TYPE_MOTOR=1, MIXERSETTINGS_MIXER2TYPE_SERVO=2 } MixerSettingsMixer2TypeOptions; // Field Mixer2Matrix information /* Array element names for field Mixer2Matrix */ typedef enum { MIXERSETTINGS_MIXER2MATRIX_THROTTLECURVE1=0, MIXERSETTINGS_MIXER2MATRIX_THROTTLECURVE2=1, MIXERSETTINGS_MIXER2MATRIX_ROLL=2, MIXERSETTINGS_MIXER2MATRIX_PITCH=3, MIXERSETTINGS_MIXER2MATRIX_YAW=4 } MixerSettingsMixer2MatrixElem; /* Number of elements for field Mixer2Matrix */ #define MIXERSETTINGS_MIXER2MATRIX_NUMELEM 5 // Field Mixer3Type information /* Enumeration options for field Mixer3Type */ typedef enum { MIXERSETTINGS_MIXER3TYPE_DISABLED=0, MIXERSETTINGS_MIXER3TYPE_MOTOR=1, MIXERSETTINGS_MIXER3TYPE_SERVO=2 } MixerSettingsMixer3TypeOptions; // Field Mixer3Matrix information /* Array element names for field Mixer3Matrix */ typedef enum { MIXERSETTINGS_MIXER3MATRIX_THROTTLECURVE1=0, MIXERSETTINGS_MIXER3MATRIX_THROTTLECURVE2=1, MIXERSETTINGS_MIXER3MATRIX_ROLL=2, MIXERSETTINGS_MIXER3MATRIX_PITCH=3, MIXERSETTINGS_MIXER3MATRIX_YAW=4 } MixerSettingsMixer3MatrixElem; /* Number of elements for field Mixer3Matrix */ #define MIXERSETTINGS_MIXER3MATRIX_NUMELEM 5 // Field Mixer4Type information /* Enumeration options for field Mixer4Type */ typedef enum { MIXERSETTINGS_MIXER4TYPE_DISABLED=0, MIXERSETTINGS_MIXER4TYPE_MOTOR=1, MIXERSETTINGS_MIXER4TYPE_SERVO=2 } MixerSettingsMixer4TypeOptions; // Field Mixer4Matrix information /* Array element names for field Mixer4Matrix */ typedef enum { MIXERSETTINGS_MIXER4MATRIX_THROTTLECURVE1=0, MIXERSETTINGS_MIXER4MATRIX_THROTTLECURVE2=1, MIXERSETTINGS_MIXER4MATRIX_ROLL=2, MIXERSETTINGS_MIXER4MATRIX_PITCH=3, MIXERSETTINGS_MIXER4MATRIX_YAW=4 } MixerSettingsMixer4MatrixElem; /* Number of elements for field Mixer4Matrix */ #define MIXERSETTINGS_MIXER4MATRIX_NUMELEM 5 // Field Mixer5Type information /* Enumeration options for field Mixer5Type */ typedef enum { MIXERSETTINGS_MIXER5TYPE_DISABLED=0, MIXERSETTINGS_MIXER5TYPE_MOTOR=1, MIXERSETTINGS_MIXER5TYPE_SERVO=2 } MixerSettingsMixer5TypeOptions; // Field Mixer5Matrix information /* Array element names for field Mixer5Matrix */ typedef enum { MIXERSETTINGS_MIXER5MATRIX_THROTTLECURVE1=0, MIXERSETTINGS_MIXER5MATRIX_THROTTLECURVE2=1, MIXERSETTINGS_MIXER5MATRIX_ROLL=2, MIXERSETTINGS_MIXER5MATRIX_PITCH=3, MIXERSETTINGS_MIXER5MATRIX_YAW=4 } MixerSettingsMixer5MatrixElem; /* Number of elements for field Mixer5Matrix */ #define MIXERSETTINGS_MIXER5MATRIX_NUMELEM 5 // Field Mixer6Type information /* Enumeration options for field Mixer6Type */ typedef enum { MIXERSETTINGS_MIXER6TYPE_DISABLED=0, MIXERSETTINGS_MIXER6TYPE_MOTOR=1, MIXERSETTINGS_MIXER6TYPE_SERVO=2 } MixerSettingsMixer6TypeOptions; // Field Mixer6Matrix information /* Array element names for field Mixer6Matrix */ typedef enum { MIXERSETTINGS_MIXER6MATRIX_THROTTLECURVE1=0, MIXERSETTINGS_MIXER6MATRIX_THROTTLECURVE2=1, MIXERSETTINGS_MIXER6MATRIX_ROLL=2, MIXERSETTINGS_MIXER6MATRIX_PITCH=3, MIXERSETTINGS_MIXER6MATRIX_YAW=4 } MixerSettingsMixer6MatrixElem; /* Number of elements for field Mixer6Matrix */ #define MIXERSETTINGS_MIXER6MATRIX_NUMELEM 5 // Field Mixer7Type information /* Enumeration options for field Mixer7Type */ typedef enum { MIXERSETTINGS_MIXER7TYPE_DISABLED=0, MIXERSETTINGS_MIXER7TYPE_MOTOR=1, MIXERSETTINGS_MIXER7TYPE_SERVO=2 } MixerSettingsMixer7TypeOptions; // Field Mixer7Matrix information /* Array element names for field Mixer7Matrix */ typedef enum { MIXERSETTINGS_MIXER7MATRIX_THROTTLECURVE1=0, MIXERSETTINGS_MIXER7MATRIX_THROTTLECURVE2=1, MIXERSETTINGS_MIXER7MATRIX_ROLL=2, MIXERSETTINGS_MIXER7MATRIX_PITCH=3, MIXERSETTINGS_MIXER7MATRIX_YAW=4 } MixerSettingsMixer7MatrixElem; /* Number of elements for field Mixer7Matrix */ #define MIXERSETTINGS_MIXER7MATRIX_NUMELEM 5 // Generic interface functions int32_t MixerSettingsInitialize(); UAVObjHandle MixerSettingsHandle(); #endif // MIXERSETTINGS_H /** * @} * @} */