2010-09-21 09:08:51 +02:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
* @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
|
2010-09-21 21:31:17 +02:00
|
|
|
#define MIXERSETTINGS_OBJID 3818217990U
|
2010-09-21 09:08:51 +02:00
|
|
|
#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;
|
2010-09-21 21:31:17 +02:00
|
|
|
float Mixer0Vector[5];
|
2010-09-21 09:08:51 +02:00
|
|
|
uint8_t Mixer1Type;
|
2010-09-21 21:31:17 +02:00
|
|
|
float Mixer1Vector[5];
|
2010-09-21 09:08:51 +02:00
|
|
|
uint8_t Mixer2Type;
|
2010-09-21 21:31:17 +02:00
|
|
|
float Mixer2Vector[5];
|
2010-09-21 09:08:51 +02:00
|
|
|
uint8_t Mixer3Type;
|
2010-09-21 21:31:17 +02:00
|
|
|
float Mixer3Vector[5];
|
2010-09-21 09:08:51 +02:00
|
|
|
uint8_t Mixer4Type;
|
2010-09-21 21:31:17 +02:00
|
|
|
float Mixer4Vector[5];
|
2010-09-21 09:08:51 +02:00
|
|
|
uint8_t Mixer5Type;
|
2010-09-21 21:31:17 +02:00
|
|
|
float Mixer5Vector[5];
|
2010-09-21 09:08:51 +02:00
|
|
|
uint8_t Mixer6Type;
|
2010-09-21 21:31:17 +02:00
|
|
|
float Mixer6Vector[5];
|
2010-09-21 09:08:51 +02:00
|
|
|
uint8_t Mixer7Type;
|
2010-09-21 21:31:17 +02:00
|
|
|
float Mixer7Vector[5];
|
2010-09-21 09:08:51 +02:00
|
|
|
|
|
|
|
} __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;
|
2010-09-21 21:31:17 +02:00
|
|
|
// Field Mixer0Vector information
|
|
|
|
/* Array element names for field Mixer0Vector */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER0VECTOR_THROTTLECURVE1=0, MIXERSETTINGS_MIXER0VECTOR_THROTTLECURVE2=1, MIXERSETTINGS_MIXER0VECTOR_ROLL=2, MIXERSETTINGS_MIXER0VECTOR_PITCH=3, MIXERSETTINGS_MIXER0VECTOR_YAW=4 } MixerSettingsMixer0VectorElem;
|
|
|
|
/* Number of elements for field Mixer0Vector */
|
|
|
|
#define MIXERSETTINGS_MIXER0VECTOR_NUMELEM 5
|
2010-09-21 09:08:51 +02:00
|
|
|
// Field Mixer1Type information
|
|
|
|
/* Enumeration options for field Mixer1Type */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER1TYPE_DISABLED=0, MIXERSETTINGS_MIXER1TYPE_MOTOR=1, MIXERSETTINGS_MIXER1TYPE_SERVO=2 } MixerSettingsMixer1TypeOptions;
|
2010-09-21 21:31:17 +02:00
|
|
|
// Field Mixer1Vector information
|
|
|
|
/* Array element names for field Mixer1Vector */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER1VECTOR_THROTTLECURVE1=0, MIXERSETTINGS_MIXER1VECTOR_THROTTLECURVE2=1, MIXERSETTINGS_MIXER1VECTOR_ROLL=2, MIXERSETTINGS_MIXER1VECTOR_PITCH=3, MIXERSETTINGS_MIXER1VECTOR_YAW=4 } MixerSettingsMixer1VectorElem;
|
|
|
|
/* Number of elements for field Mixer1Vector */
|
|
|
|
#define MIXERSETTINGS_MIXER1VECTOR_NUMELEM 5
|
2010-09-21 09:08:51 +02:00
|
|
|
// Field Mixer2Type information
|
|
|
|
/* Enumeration options for field Mixer2Type */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER2TYPE_DISABLED=0, MIXERSETTINGS_MIXER2TYPE_MOTOR=1, MIXERSETTINGS_MIXER2TYPE_SERVO=2 } MixerSettingsMixer2TypeOptions;
|
2010-09-21 21:31:17 +02:00
|
|
|
// Field Mixer2Vector information
|
|
|
|
/* Array element names for field Mixer2Vector */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER2VECTOR_THROTTLECURVE1=0, MIXERSETTINGS_MIXER2VECTOR_THROTTLECURVE2=1, MIXERSETTINGS_MIXER2VECTOR_ROLL=2, MIXERSETTINGS_MIXER2VECTOR_PITCH=3, MIXERSETTINGS_MIXER2VECTOR_YAW=4 } MixerSettingsMixer2VectorElem;
|
|
|
|
/* Number of elements for field Mixer2Vector */
|
|
|
|
#define MIXERSETTINGS_MIXER2VECTOR_NUMELEM 5
|
2010-09-21 09:08:51 +02:00
|
|
|
// Field Mixer3Type information
|
|
|
|
/* Enumeration options for field Mixer3Type */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER3TYPE_DISABLED=0, MIXERSETTINGS_MIXER3TYPE_MOTOR=1, MIXERSETTINGS_MIXER3TYPE_SERVO=2 } MixerSettingsMixer3TypeOptions;
|
2010-09-21 21:31:17 +02:00
|
|
|
// Field Mixer3Vector information
|
|
|
|
/* Array element names for field Mixer3Vector */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER3VECTOR_THROTTLECURVE1=0, MIXERSETTINGS_MIXER3VECTOR_THROTTLECURVE2=1, MIXERSETTINGS_MIXER3VECTOR_ROLL=2, MIXERSETTINGS_MIXER3VECTOR_PITCH=3, MIXERSETTINGS_MIXER3VECTOR_YAW=4 } MixerSettingsMixer3VectorElem;
|
|
|
|
/* Number of elements for field Mixer3Vector */
|
|
|
|
#define MIXERSETTINGS_MIXER3VECTOR_NUMELEM 5
|
2010-09-21 09:08:51 +02:00
|
|
|
// Field Mixer4Type information
|
|
|
|
/* Enumeration options for field Mixer4Type */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER4TYPE_DISABLED=0, MIXERSETTINGS_MIXER4TYPE_MOTOR=1, MIXERSETTINGS_MIXER4TYPE_SERVO=2 } MixerSettingsMixer4TypeOptions;
|
2010-09-21 21:31:17 +02:00
|
|
|
// Field Mixer4Vector information
|
|
|
|
/* Array element names for field Mixer4Vector */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER4VECTOR_THROTTLECURVE1=0, MIXERSETTINGS_MIXER4VECTOR_THROTTLECURVE2=1, MIXERSETTINGS_MIXER4VECTOR_ROLL=2, MIXERSETTINGS_MIXER4VECTOR_PITCH=3, MIXERSETTINGS_MIXER4VECTOR_YAW=4 } MixerSettingsMixer4VectorElem;
|
|
|
|
/* Number of elements for field Mixer4Vector */
|
|
|
|
#define MIXERSETTINGS_MIXER4VECTOR_NUMELEM 5
|
2010-09-21 09:08:51 +02:00
|
|
|
// Field Mixer5Type information
|
|
|
|
/* Enumeration options for field Mixer5Type */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER5TYPE_DISABLED=0, MIXERSETTINGS_MIXER5TYPE_MOTOR=1, MIXERSETTINGS_MIXER5TYPE_SERVO=2 } MixerSettingsMixer5TypeOptions;
|
2010-09-21 21:31:17 +02:00
|
|
|
// Field Mixer5Vector information
|
|
|
|
/* Array element names for field Mixer5Vector */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER5VECTOR_THROTTLECURVE1=0, MIXERSETTINGS_MIXER5VECTOR_THROTTLECURVE2=1, MIXERSETTINGS_MIXER5VECTOR_ROLL=2, MIXERSETTINGS_MIXER5VECTOR_PITCH=3, MIXERSETTINGS_MIXER5VECTOR_YAW=4 } MixerSettingsMixer5VectorElem;
|
|
|
|
/* Number of elements for field Mixer5Vector */
|
|
|
|
#define MIXERSETTINGS_MIXER5VECTOR_NUMELEM 5
|
2010-09-21 09:08:51 +02:00
|
|
|
// Field Mixer6Type information
|
|
|
|
/* Enumeration options for field Mixer6Type */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER6TYPE_DISABLED=0, MIXERSETTINGS_MIXER6TYPE_MOTOR=1, MIXERSETTINGS_MIXER6TYPE_SERVO=2 } MixerSettingsMixer6TypeOptions;
|
2010-09-21 21:31:17 +02:00
|
|
|
// Field Mixer6Vector information
|
|
|
|
/* Array element names for field Mixer6Vector */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER6VECTOR_THROTTLECURVE1=0, MIXERSETTINGS_MIXER6VECTOR_THROTTLECURVE2=1, MIXERSETTINGS_MIXER6VECTOR_ROLL=2, MIXERSETTINGS_MIXER6VECTOR_PITCH=3, MIXERSETTINGS_MIXER6VECTOR_YAW=4 } MixerSettingsMixer6VectorElem;
|
|
|
|
/* Number of elements for field Mixer6Vector */
|
|
|
|
#define MIXERSETTINGS_MIXER6VECTOR_NUMELEM 5
|
2010-09-21 09:08:51 +02:00
|
|
|
// Field Mixer7Type information
|
|
|
|
/* Enumeration options for field Mixer7Type */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER7TYPE_DISABLED=0, MIXERSETTINGS_MIXER7TYPE_MOTOR=1, MIXERSETTINGS_MIXER7TYPE_SERVO=2 } MixerSettingsMixer7TypeOptions;
|
2010-09-21 21:31:17 +02:00
|
|
|
// Field Mixer7Vector information
|
|
|
|
/* Array element names for field Mixer7Vector */
|
|
|
|
typedef enum { MIXERSETTINGS_MIXER7VECTOR_THROTTLECURVE1=0, MIXERSETTINGS_MIXER7VECTOR_THROTTLECURVE2=1, MIXERSETTINGS_MIXER7VECTOR_ROLL=2, MIXERSETTINGS_MIXER7VECTOR_PITCH=3, MIXERSETTINGS_MIXER7VECTOR_YAW=4 } MixerSettingsMixer7VectorElem;
|
|
|
|
/* Number of elements for field Mixer7Vector */
|
|
|
|
#define MIXERSETTINGS_MIXER7VECTOR_NUMELEM 5
|
2010-09-21 09:08:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
// Generic interface functions
|
|
|
|
int32_t MixerSettingsInitialize();
|
|
|
|
UAVObjHandle MixerSettingsHandle();
|
|
|
|
|
|
|
|
#endif // MIXERSETTINGS_H
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @}
|
|
|
|
* @}
|
|
|
|
*/
|