1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-11 19:24:10 +01:00

Manual control: Changed 'Position' stabilization mode to 'Attitude'

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1944 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
les 2010-10-11 17:58:11 +00:00 committed by les
parent 1f6f5fe674
commit 6d6ec37474
12 changed files with 33 additions and 33 deletions

View File

@ -175,8 +175,8 @@ static void manualControlTask(void *parameters)
cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NONE; cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NONE;
else if(settings.Pos1StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_RATE) else if(settings.Pos1StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_RATE)
cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE; cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE;
else if(settings.Pos1StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_POSITION) else if(settings.Pos1StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_ATTITUDE)
cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_POSITION; cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ATTITUDE;
} }
if(settings.Pos1FlightMode == MANUALCONTROLSETTINGS_POS1FLIGHTMODE_MANUAL) if(settings.Pos1FlightMode == MANUALCONTROLSETTINGS_POS1FLIGHTMODE_MANUAL)
cmd.FlightMode = MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL; cmd.FlightMode = MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL;
@ -190,8 +190,8 @@ static void manualControlTask(void *parameters)
cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NONE; cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NONE;
else if(settings.Pos3StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_RATE) else if(settings.Pos3StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_RATE)
cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE; cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE;
else if(settings.Pos3StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_POSITION) else if(settings.Pos3StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_ATTITUDE)
cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_POSITION; cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ATTITUDE;
} }
if(settings.Pos3FlightMode == MANUALCONTROLSETTINGS_POS3FLIGHTMODE_MANUAL) if(settings.Pos3FlightMode == MANUALCONTROLSETTINGS_POS3FLIGHTMODE_MANUAL)
cmd.FlightMode = MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL; cmd.FlightMode = MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL;
@ -205,8 +205,8 @@ static void manualControlTask(void *parameters)
cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NONE; cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NONE;
else if(settings.Pos2StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_RATE) else if(settings.Pos2StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_RATE)
cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE; cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE;
else if(settings.Pos2StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_POSITION) else if(settings.Pos2StabilizationSettings[i] == MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_ATTITUDE)
cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_POSITION; cmd.StabilizationSettings[i] = MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ATTITUDE;
} }
if(settings.Pos2FlightMode == MANUALCONTROLSETTINGS_POS2FLIGHTMODE_MANUAL) if(settings.Pos2FlightMode == MANUALCONTROLSETTINGS_POS2FLIGHTMODE_MANUAL)
cmd.FlightMode = MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL; cmd.FlightMode = MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL;

View File

@ -159,7 +159,7 @@ static void stabilizationTask(void* parameters)
rates[ct] = manualAxis[ct] * settings.ManualRate[ct]; rates[ct] = manualAxis[ct] * settings.ManualRate[ct];
break; break;
case MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_POSITION: case MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ATTITUDE:
rates[ct] = ApplyPid(&pids[PID_ROLL + ct], attitudeDesiredAxis[ct], attitudeActualAxis[ct], 1); rates[ct] = ApplyPid(&pids[PID_ROLL + ct], attitudeDesiredAxis[ct], attitudeActualAxis[ct], 1);
break; break;
} }
@ -184,7 +184,7 @@ static void stabilizationTask(void* parameters)
switch(manualControl.StabilizationSettings[ct]) switch(manualControl.StabilizationSettings[ct])
{ {
case MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE: case MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE:
case MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_POSITION: case MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ATTITUDE:
{ {
float command = ApplyPid(&pids[PID_RATE_ROLL + ct], rates[ct], attitudeRaw.gyros_filtered[ct], 0); float command = ApplyPid(&pids[PID_RATE_ROLL + ct], rates[ct], attitudeRaw.gyros_filtered[ct], 0);
actuatorDesiredAxis[ct] = bound(command); actuatorDesiredAxis[ct] = bound(command);

View File

@ -102,7 +102,7 @@ typedef enum { MANUALCONTROLCOMMAND_ARMED_FALSE=0, MANUALCONTROLCOMMAND_ARMED_TR
typedef enum { MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL=0, MANUALCONTROLCOMMAND_FLIGHTMODE_STABILIZED=1, MANUALCONTROLCOMMAND_FLIGHTMODE_AUTO=2 } ManualControlCommandFlightModeOptions; typedef enum { MANUALCONTROLCOMMAND_FLIGHTMODE_MANUAL=0, MANUALCONTROLCOMMAND_FLIGHTMODE_STABILIZED=1, MANUALCONTROLCOMMAND_FLIGHTMODE_AUTO=2 } ManualControlCommandFlightModeOptions;
// Field StabilizationSettings information // Field StabilizationSettings information
/* Enumeration options for field StabilizationSettings */ /* Enumeration options for field StabilizationSettings */
typedef enum { MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_POSITION=2 } ManualControlCommandStabilizationSettingsOptions; typedef enum { MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ATTITUDE=2 } ManualControlCommandStabilizationSettingsOptions;
/* Array element names for field StabilizationSettings */ /* Array element names for field StabilizationSettings */
typedef enum { MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_YAW=2 } ManualControlCommandStabilizationSettingsElem; typedef enum { MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLCOMMAND_STABILIZATIONSETTINGS_YAW=2 } ManualControlCommandStabilizationSettingsElem;
/* Number of elements for field StabilizationSettings */ /* Number of elements for field StabilizationSettings */

View File

@ -122,21 +122,21 @@ typedef enum { MANUALCONTROLSETTINGS_ACCESSORY2_CHANNEL0=0, MANUALCONTROLSETTING
typedef enum { MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL0=0, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL1=1, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL2=2, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL3=3, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL4=4, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL5=5, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL6=6, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL7=7, MANUALCONTROLSETTINGS_ACCESSORY3_NONE=8 } ManualControlSettingsAccessory3Options; typedef enum { MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL0=0, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL1=1, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL2=2, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL3=3, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL4=4, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL5=5, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL6=6, MANUALCONTROLSETTINGS_ACCESSORY3_CHANNEL7=7, MANUALCONTROLSETTINGS_ACCESSORY3_NONE=8 } ManualControlSettingsAccessory3Options;
// Field Pos1StabilizationSettings information // Field Pos1StabilizationSettings information
/* Enumeration options for field Pos1StabilizationSettings */ /* Enumeration options for field Pos1StabilizationSettings */
typedef enum { MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_POSITION=2 } ManualControlSettingsPos1StabilizationSettingsOptions; typedef enum { MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_ATTITUDE=2 } ManualControlSettingsPos1StabilizationSettingsOptions;
/* Array element names for field Pos1StabilizationSettings */ /* Array element names for field Pos1StabilizationSettings */
typedef enum { MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_YAW=2 } ManualControlSettingsPos1StabilizationSettingsElem; typedef enum { MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_YAW=2 } ManualControlSettingsPos1StabilizationSettingsElem;
/* Number of elements for field Pos1StabilizationSettings */ /* Number of elements for field Pos1StabilizationSettings */
#define MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_NUMELEM 3 #define MANUALCONTROLSETTINGS_POS1STABILIZATIONSETTINGS_NUMELEM 3
// Field Pos2StabilizationSettings information // Field Pos2StabilizationSettings information
/* Enumeration options for field Pos2StabilizationSettings */ /* Enumeration options for field Pos2StabilizationSettings */
typedef enum { MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_POSITION=2 } ManualControlSettingsPos2StabilizationSettingsOptions; typedef enum { MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_ATTITUDE=2 } ManualControlSettingsPos2StabilizationSettingsOptions;
/* Array element names for field Pos2StabilizationSettings */ /* Array element names for field Pos2StabilizationSettings */
typedef enum { MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_YAW=2 } ManualControlSettingsPos2StabilizationSettingsElem; typedef enum { MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_YAW=2 } ManualControlSettingsPos2StabilizationSettingsElem;
/* Number of elements for field Pos2StabilizationSettings */ /* Number of elements for field Pos2StabilizationSettings */
#define MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_NUMELEM 3 #define MANUALCONTROLSETTINGS_POS2STABILIZATIONSETTINGS_NUMELEM 3
// Field Pos3StabilizationSettings information // Field Pos3StabilizationSettings information
/* Enumeration options for field Pos3StabilizationSettings */ /* Enumeration options for field Pos3StabilizationSettings */
typedef enum { MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_POSITION=2 } ManualControlSettingsPos3StabilizationSettingsOptions; typedef enum { MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_NONE=0, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_RATE=1, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_ATTITUDE=2 } ManualControlSettingsPos3StabilizationSettingsOptions;
/* Array element names for field Pos3StabilizationSettings */ /* Array element names for field Pos3StabilizationSettings */
typedef enum { MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_YAW=2 } ManualControlSettingsPos3StabilizationSettingsElem; typedef enum { MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_ROLL=0, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_PITCH=1, MANUALCONTROLSETTINGS_POS3STABILIZATIONSETTINGS_YAW=2 } ManualControlSettingsPos3StabilizationSettingsElem;
/* Number of elements for field Pos3StabilizationSettings */ /* Number of elements for field Pos3StabilizationSettings */

View File

@ -80,7 +80,7 @@ ManualControlCommand::ManualControlCommand(): UAVDataObject(OBJID, ISSINGLEINST,
QStringList StabilizationSettingsEnumOptions; QStringList StabilizationSettingsEnumOptions;
StabilizationSettingsEnumOptions.append("None"); StabilizationSettingsEnumOptions.append("None");
StabilizationSettingsEnumOptions.append("Rate"); StabilizationSettingsEnumOptions.append("Rate");
StabilizationSettingsEnumOptions.append("Position"); StabilizationSettingsEnumOptions.append("Attitude");
fields.append( new UAVObjectField(QString("StabilizationSettings"), QString(""), UAVObjectField::ENUM, StabilizationSettingsElemNames, StabilizationSettingsEnumOptions) ); fields.append( new UAVObjectField(QString("StabilizationSettings"), QString(""), UAVObjectField::ENUM, StabilizationSettingsElemNames, StabilizationSettingsEnumOptions) );
QStringList Accessory1ElemNames; QStringList Accessory1ElemNames;
Accessory1ElemNames.append("0"); Accessory1ElemNames.append("0");

View File

@ -74,7 +74,7 @@ public:
typedef enum { FLIGHTMODE_MANUAL=0, FLIGHTMODE_STABILIZED=1, FLIGHTMODE_AUTO=2 } FlightModeOptions; typedef enum { FLIGHTMODE_MANUAL=0, FLIGHTMODE_STABILIZED=1, FLIGHTMODE_AUTO=2 } FlightModeOptions;
// Field StabilizationSettings information // Field StabilizationSettings information
/* Enumeration options for field StabilizationSettings */ /* Enumeration options for field StabilizationSettings */
typedef enum { STABILIZATIONSETTINGS_NONE=0, STABILIZATIONSETTINGS_RATE=1, STABILIZATIONSETTINGS_POSITION=2 } StabilizationSettingsOptions; typedef enum { STABILIZATIONSETTINGS_NONE=0, STABILIZATIONSETTINGS_RATE=1, STABILIZATIONSETTINGS_ATTITUDE=2 } StabilizationSettingsOptions;
/* Array element names for field StabilizationSettings */ /* Array element names for field StabilizationSettings */
typedef enum { STABILIZATIONSETTINGS_ROLL=0, STABILIZATIONSETTINGS_PITCH=1, STABILIZATIONSETTINGS_YAW=2 } StabilizationSettingsElem; typedef enum { STABILIZATIONSETTINGS_ROLL=0, STABILIZATIONSETTINGS_PITCH=1, STABILIZATIONSETTINGS_YAW=2 } StabilizationSettingsElem;
/* Number of elements for field StabilizationSettings */ /* Number of elements for field StabilizationSettings */

View File

@ -126,7 +126,7 @@ _fields = [ \
{ {
'0' : 'None', '0' : 'None',
'1' : 'Rate', '1' : 'Rate',
'2' : 'Position', '2' : 'Attitude',
} }
), ),
uavobject.UAVObjectField( uavobject.UAVObjectField(

View File

@ -160,7 +160,7 @@ ManualControlSettings::ManualControlSettings(): UAVDataObject(OBJID, ISSINGLEINS
QStringList Pos1StabilizationSettingsEnumOptions; QStringList Pos1StabilizationSettingsEnumOptions;
Pos1StabilizationSettingsEnumOptions.append("None"); Pos1StabilizationSettingsEnumOptions.append("None");
Pos1StabilizationSettingsEnumOptions.append("Rate"); Pos1StabilizationSettingsEnumOptions.append("Rate");
Pos1StabilizationSettingsEnumOptions.append("Position"); Pos1StabilizationSettingsEnumOptions.append("Attitude");
fields.append( new UAVObjectField(QString("Pos1StabilizationSettings"), QString(""), UAVObjectField::ENUM, Pos1StabilizationSettingsElemNames, Pos1StabilizationSettingsEnumOptions) ); fields.append( new UAVObjectField(QString("Pos1StabilizationSettings"), QString(""), UAVObjectField::ENUM, Pos1StabilizationSettingsElemNames, Pos1StabilizationSettingsEnumOptions) );
QStringList Pos2StabilizationSettingsElemNames; QStringList Pos2StabilizationSettingsElemNames;
Pos2StabilizationSettingsElemNames.append("Roll"); Pos2StabilizationSettingsElemNames.append("Roll");
@ -169,7 +169,7 @@ ManualControlSettings::ManualControlSettings(): UAVDataObject(OBJID, ISSINGLEINS
QStringList Pos2StabilizationSettingsEnumOptions; QStringList Pos2StabilizationSettingsEnumOptions;
Pos2StabilizationSettingsEnumOptions.append("None"); Pos2StabilizationSettingsEnumOptions.append("None");
Pos2StabilizationSettingsEnumOptions.append("Rate"); Pos2StabilizationSettingsEnumOptions.append("Rate");
Pos2StabilizationSettingsEnumOptions.append("Position"); Pos2StabilizationSettingsEnumOptions.append("Attitude");
fields.append( new UAVObjectField(QString("Pos2StabilizationSettings"), QString(""), UAVObjectField::ENUM, Pos2StabilizationSettingsElemNames, Pos2StabilizationSettingsEnumOptions) ); fields.append( new UAVObjectField(QString("Pos2StabilizationSettings"), QString(""), UAVObjectField::ENUM, Pos2StabilizationSettingsElemNames, Pos2StabilizationSettingsEnumOptions) );
QStringList Pos3StabilizationSettingsElemNames; QStringList Pos3StabilizationSettingsElemNames;
Pos3StabilizationSettingsElemNames.append("Roll"); Pos3StabilizationSettingsElemNames.append("Roll");
@ -178,7 +178,7 @@ ManualControlSettings::ManualControlSettings(): UAVDataObject(OBJID, ISSINGLEINS
QStringList Pos3StabilizationSettingsEnumOptions; QStringList Pos3StabilizationSettingsEnumOptions;
Pos3StabilizationSettingsEnumOptions.append("None"); Pos3StabilizationSettingsEnumOptions.append("None");
Pos3StabilizationSettingsEnumOptions.append("Rate"); Pos3StabilizationSettingsEnumOptions.append("Rate");
Pos3StabilizationSettingsEnumOptions.append("Position"); Pos3StabilizationSettingsEnumOptions.append("Attitude");
fields.append( new UAVObjectField(QString("Pos3StabilizationSettings"), QString(""), UAVObjectField::ENUM, Pos3StabilizationSettingsElemNames, Pos3StabilizationSettingsEnumOptions) ); fields.append( new UAVObjectField(QString("Pos3StabilizationSettings"), QString(""), UAVObjectField::ENUM, Pos3StabilizationSettingsElemNames, Pos3StabilizationSettingsEnumOptions) );
QStringList Pos1FlightModeElemNames; QStringList Pos1FlightModeElemNames;
Pos1FlightModeElemNames.append("0"); Pos1FlightModeElemNames.append("0");

View File

@ -94,21 +94,21 @@ public:
typedef enum { ACCESSORY3_CHANNEL0=0, ACCESSORY3_CHANNEL1=1, ACCESSORY3_CHANNEL2=2, ACCESSORY3_CHANNEL3=3, ACCESSORY3_CHANNEL4=4, ACCESSORY3_CHANNEL5=5, ACCESSORY3_CHANNEL6=6, ACCESSORY3_CHANNEL7=7, ACCESSORY3_NONE=8 } Accessory3Options; typedef enum { ACCESSORY3_CHANNEL0=0, ACCESSORY3_CHANNEL1=1, ACCESSORY3_CHANNEL2=2, ACCESSORY3_CHANNEL3=3, ACCESSORY3_CHANNEL4=4, ACCESSORY3_CHANNEL5=5, ACCESSORY3_CHANNEL6=6, ACCESSORY3_CHANNEL7=7, ACCESSORY3_NONE=8 } Accessory3Options;
// Field Pos1StabilizationSettings information // Field Pos1StabilizationSettings information
/* Enumeration options for field Pos1StabilizationSettings */ /* Enumeration options for field Pos1StabilizationSettings */
typedef enum { POS1STABILIZATIONSETTINGS_NONE=0, POS1STABILIZATIONSETTINGS_RATE=1, POS1STABILIZATIONSETTINGS_POSITION=2 } Pos1StabilizationSettingsOptions; typedef enum { POS1STABILIZATIONSETTINGS_NONE=0, POS1STABILIZATIONSETTINGS_RATE=1, POS1STABILIZATIONSETTINGS_ATTITUDE=2 } Pos1StabilizationSettingsOptions;
/* Array element names for field Pos1StabilizationSettings */ /* Array element names for field Pos1StabilizationSettings */
typedef enum { POS1STABILIZATIONSETTINGS_ROLL=0, POS1STABILIZATIONSETTINGS_PITCH=1, POS1STABILIZATIONSETTINGS_YAW=2 } Pos1StabilizationSettingsElem; typedef enum { POS1STABILIZATIONSETTINGS_ROLL=0, POS1STABILIZATIONSETTINGS_PITCH=1, POS1STABILIZATIONSETTINGS_YAW=2 } Pos1StabilizationSettingsElem;
/* Number of elements for field Pos1StabilizationSettings */ /* Number of elements for field Pos1StabilizationSettings */
static const quint32 POS1STABILIZATIONSETTINGS_NUMELEM = 3; static const quint32 POS1STABILIZATIONSETTINGS_NUMELEM = 3;
// Field Pos2StabilizationSettings information // Field Pos2StabilizationSettings information
/* Enumeration options for field Pos2StabilizationSettings */ /* Enumeration options for field Pos2StabilizationSettings */
typedef enum { POS2STABILIZATIONSETTINGS_NONE=0, POS2STABILIZATIONSETTINGS_RATE=1, POS2STABILIZATIONSETTINGS_POSITION=2 } Pos2StabilizationSettingsOptions; typedef enum { POS2STABILIZATIONSETTINGS_NONE=0, POS2STABILIZATIONSETTINGS_RATE=1, POS2STABILIZATIONSETTINGS_ATTITUDE=2 } Pos2StabilizationSettingsOptions;
/* Array element names for field Pos2StabilizationSettings */ /* Array element names for field Pos2StabilizationSettings */
typedef enum { POS2STABILIZATIONSETTINGS_ROLL=0, POS2STABILIZATIONSETTINGS_PITCH=1, POS2STABILIZATIONSETTINGS_YAW=2 } Pos2StabilizationSettingsElem; typedef enum { POS2STABILIZATIONSETTINGS_ROLL=0, POS2STABILIZATIONSETTINGS_PITCH=1, POS2STABILIZATIONSETTINGS_YAW=2 } Pos2StabilizationSettingsElem;
/* Number of elements for field Pos2StabilizationSettings */ /* Number of elements for field Pos2StabilizationSettings */
static const quint32 POS2STABILIZATIONSETTINGS_NUMELEM = 3; static const quint32 POS2STABILIZATIONSETTINGS_NUMELEM = 3;
// Field Pos3StabilizationSettings information // Field Pos3StabilizationSettings information
/* Enumeration options for field Pos3StabilizationSettings */ /* Enumeration options for field Pos3StabilizationSettings */
typedef enum { POS3STABILIZATIONSETTINGS_NONE=0, POS3STABILIZATIONSETTINGS_RATE=1, POS3STABILIZATIONSETTINGS_POSITION=2 } Pos3StabilizationSettingsOptions; typedef enum { POS3STABILIZATIONSETTINGS_NONE=0, POS3STABILIZATIONSETTINGS_RATE=1, POS3STABILIZATIONSETTINGS_ATTITUDE=2 } Pos3StabilizationSettingsOptions;
/* Array element names for field Pos3StabilizationSettings */ /* Array element names for field Pos3StabilizationSettings */
typedef enum { POS3STABILIZATIONSETTINGS_ROLL=0, POS3STABILIZATIONSETTINGS_PITCH=1, POS3STABILIZATIONSETTINGS_YAW=2 } Pos3StabilizationSettingsElem; typedef enum { POS3STABILIZATIONSETTINGS_ROLL=0, POS3STABILIZATIONSETTINGS_PITCH=1, POS3STABILIZATIONSETTINGS_YAW=2 } Pos3StabilizationSettingsElem;
/* Number of elements for field Pos3StabilizationSettings */ /* Number of elements for field Pos3StabilizationSettings */

View File

@ -214,7 +214,7 @@ _fields = [ \
{ {
'0' : 'None', '0' : 'None',
'1' : 'Rate', '1' : 'Rate',
'2' : 'Position', '2' : 'Attitude',
} }
), ),
uavobject.UAVObjectField( uavobject.UAVObjectField(
@ -229,7 +229,7 @@ _fields = [ \
{ {
'0' : 'None', '0' : 'None',
'1' : 'Rate', '1' : 'Rate',
'2' : 'Position', '2' : 'Attitude',
} }
), ),
uavobject.UAVObjectField( uavobject.UAVObjectField(
@ -244,7 +244,7 @@ _fields = [ \
{ {
'0' : 'None', '0' : 'None',
'1' : 'Rate', '1' : 'Rate',
'2' : 'Position', '2' : 'Attitude',
} }
), ),
uavobject.UAVObjectField( uavobject.UAVObjectField(

View File

@ -8,7 +8,7 @@
<field name="Yaw" units="%" type="float" elements="1"/> <field name="Yaw" units="%" type="float" elements="1"/>
<field name="Throttle" units="%" type="float" elements="1"/> <field name="Throttle" units="%" type="float" elements="1"/>
<field name="FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized,Auto"/> <field name="FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized,Auto"/>
<field name="StabilizationSettings" units="" type="enum" elementnames="Roll,Pitch,Yaw" options="None,Rate,Position"/> <field name="StabilizationSettings" units="" type="enum" elementnames="Roll,Pitch,Yaw" options="None,Rate,Attitude"/>
<field name="Accessory1" units="%" type="float" elements="1"/> <field name="Accessory1" units="%" type="float" elements="1"/>
<field name="Accessory2" units="%" type="float" elements="1"/> <field name="Accessory2" units="%" type="float" elements="1"/>
<field name="Accessory3" units="%" type="float" elements="1"/> <field name="Accessory3" units="%" type="float" elements="1"/>

View File

@ -10,9 +10,9 @@
<field name="Accessory1" units="channel" type="enum" elements="1" options="Channel0,Channel1,Channel2,Channel3,Channel4,Channel5,Channel6,Channel7,None" defaultvalue="None"/> <field name="Accessory1" units="channel" type="enum" elements="1" options="Channel0,Channel1,Channel2,Channel3,Channel4,Channel5,Channel6,Channel7,None" defaultvalue="None"/>
<field name="Accessory2" units="channel" type="enum" elements="1" options="Channel0,Channel1,Channel2,Channel3,Channel4,Channel5,Channel6,Channel7,None" defaultvalue="None"/> <field name="Accessory2" units="channel" type="enum" elements="1" options="Channel0,Channel1,Channel2,Channel3,Channel4,Channel5,Channel6,Channel7,None" defaultvalue="None"/>
<field name="Accessory3" units="channel" type="enum" elements="1" options="Channel0,Channel1,Channel2,Channel3,Channel4,Channel5,Channel6,Channel7,None" defaultvalue="None"/> <field name="Accessory3" units="channel" type="enum" elements="1" options="Channel0,Channel1,Channel2,Channel3,Channel4,Channel5,Channel6,Channel7,None" defaultvalue="None"/>
<field name="Pos1StabilizationSettings" units="" type="enum" elementnames="Roll,Pitch,Yaw" options="None,Rate,Position" defaultvalue="Position"/> <field name="Pos1StabilizationSettings" units="" type="enum" elementnames="Roll,Pitch,Yaw" options="None,Rate,Attitude" defaultvalue="Attitude"/>
<field name="Pos2StabilizationSettings" units="" type="enum" elementnames="Roll,Pitch,Yaw" options="None,Rate,Position" defaultvalue="Position"/> <field name="Pos2StabilizationSettings" units="" type="enum" elementnames="Roll,Pitch,Yaw" options="None,Rate,Attitude" defaultvalue="Attitude"/>
<field name="Pos3StabilizationSettings" units="" type="enum" elementnames="Roll,Pitch,Yaw" options="None,Rate,Position" defaultvalue="Position"/> <field name="Pos3StabilizationSettings" units="" type="enum" elementnames="Roll,Pitch,Yaw" options="None,Rate,Attitude" defaultvalue="Attitude"/>
<field name="Pos1FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized,Auto" defaultvalue="Manual"/> <field name="Pos1FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized,Auto" defaultvalue="Manual"/>
<field name="Pos2FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized,Auto" defaultvalue="Stabilized"/> <field name="Pos2FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized,Auto" defaultvalue="Stabilized"/>
<field name="Pos3FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized,Auto" defaultvalue="Auto"/> <field name="Pos3FlightMode" units="" type="enum" elements="1" options="Manual,Stabilized,Auto" defaultvalue="Auto"/>