diff --git a/flight/OpenPilot/UAVObjects/actuatorsettings.c b/flight/OpenPilot/UAVObjects/actuatorsettings.c index bd66ed3f2..4b8e927e1 100644 --- a/flight/OpenPilot/UAVObjects/actuatorsettings.c +++ b/flight/OpenPilot/UAVObjects/actuatorsettings.c @@ -87,6 +87,30 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId) data.VTOLMotorSW = 8; data.VTOLMotorW = 8; data.VTOLMotorNW = 8; + data.CCPMYawStabilizationInManualMode = 0; + data.CCPMFlybarless = 0; + data.CCPMThrottleCurve[0] = 0; + data.CCPMThrottleCurve[1] = 0; + data.CCPMThrottleCurve[2] = 0; + data.CCPMThrottleCurve[3] = 0; + data.CCPMThrottleCurve[4] = 0; + data.CCPMPitchCurve[0] = 0; + data.CCPMPitchCurve[1] = 0; + data.CCPMPitchCurve[2] = 0; + data.CCPMPitchCurve[3] = 0; + data.CCPMPitchCurve[4] = 0; + data.CCPMCollectiveConstant = 0.5; + data.CCPMCorrectionAngle = 0; + data.CCPMAngleW = 0; + data.CCPMAngleX = 60; + data.CCPMAngleY = 180; + data.CCPMAngleZ = 300; + data.CCPMServoW = 8; + data.CCPMServoX = 8; + data.CCPMServoY = 8; + data.CCPMServoZ = 8; + data.CCPMThrottle = 8; + data.CCPMTailRotor = 8; data.ChannelUpdateFreq[0] = 50; data.ChannelUpdateFreq[1] = 50; data.ChannelMax[0] = 2000; diff --git a/flight/OpenPilot/UAVObjects/inc/actuatorsettings.h b/flight/OpenPilot/UAVObjects/inc/actuatorsettings.h index d5a8d423d..fb566e753 100644 --- a/flight/OpenPilot/UAVObjects/inc/actuatorsettings.h +++ b/flight/OpenPilot/UAVObjects/inc/actuatorsettings.h @@ -33,7 +33,7 @@ #define ACTUATORSETTINGS_H // Object constants -#define ACTUATORSETTINGS_OBJID 3054509114U +#define ACTUATORSETTINGS_OBJID 3352303420U #define ACTUATORSETTINGS_NAME "ActuatorSettings" #define ACTUATORSETTINGS_METANAME "ActuatorSettingsMeta" #define ACTUATORSETTINGS_ISSINGLEINST 1 @@ -71,6 +71,22 @@ typedef struct { uint8_t VTOLMotorSW; uint8_t VTOLMotorW; uint8_t VTOLMotorNW; + uint8_t CCPMYawStabilizationInManualMode; + uint8_t CCPMFlybarless; + float CCPMThrottleCurve[5]; + float CCPMPitchCurve[5]; + float CCPMCollectiveConstant; + float CCPMCorrectionAngle; + float CCPMAngleW; + float CCPMAngleX; + float CCPMAngleY; + float CCPMAngleZ; + uint8_t CCPMServoW; + uint8_t CCPMServoX; + uint8_t CCPMServoY; + uint8_t CCPMServoZ; + uint8_t CCPMThrottle; + uint8_t CCPMTailRotor; int16_t ChannelUpdateFreq[2]; int16_t ChannelMax[8]; int16_t ChannelNeutral[8]; @@ -121,6 +137,42 @@ typedef enum { ACTUATORSETTINGS_VTOLMOTORW_CHANNEL0=0, ACTUATORSETTINGS_VTOLMOTO // Field VTOLMotorNW information /* Enumeration options for field VTOLMotorNW */ typedef enum { ACTUATORSETTINGS_VTOLMOTORNW_CHANNEL0=0, ACTUATORSETTINGS_VTOLMOTORNW_CHANNEL1=1, ACTUATORSETTINGS_VTOLMOTORNW_CHANNEL2=2, ACTUATORSETTINGS_VTOLMOTORNW_CHANNEL3=3, ACTUATORSETTINGS_VTOLMOTORNW_CHANNEL4=4, ACTUATORSETTINGS_VTOLMOTORNW_CHANNEL5=5, ACTUATORSETTINGS_VTOLMOTORNW_CHANNEL6=6, ACTUATORSETTINGS_VTOLMOTORNW_CHANNEL7=7, ACTUATORSETTINGS_VTOLMOTORNW_NONE=8 } ActuatorSettingsVTOLMotorNWOptions; +// Field CCPMYawStabilizationInManualMode information +/* Enumeration options for field CCPMYawStabilizationInManualMode */ +typedef enum { ACTUATORSETTINGS_CCPMYAWSTABILIZATIONINMANUALMODE_FALSE=0, ACTUATORSETTINGS_CCPMYAWSTABILIZATIONINMANUALMODE_TRUE=1 } ActuatorSettingsCCPMYawStabilizationInManualModeOptions; +// Field CCPMFlybarless information +/* Enumeration options for field CCPMFlybarless */ +typedef enum { ACTUATORSETTINGS_CCPMFLYBARLESS_FALSE=0, ACTUATORSETTINGS_CCPMFLYBARLESS_TRUE=1 } ActuatorSettingsCCPMFlybarlessOptions; +// Field CCPMThrottleCurve information +/* Number of elements for field CCPMThrottleCurve */ +#define ACTUATORSETTINGS_CCPMTHROTTLECURVE_NUMELEM 5 +// Field CCPMPitchCurve information +/* Number of elements for field CCPMPitchCurve */ +#define ACTUATORSETTINGS_CCPMPITCHCURVE_NUMELEM 5 +// Field CCPMCollectiveConstant information +// Field CCPMCorrectionAngle information +// Field CCPMAngleW information +// Field CCPMAngleX information +// Field CCPMAngleY information +// Field CCPMAngleZ information +// Field CCPMServoW information +/* Enumeration options for field CCPMServoW */ +typedef enum { ACTUATORSETTINGS_CCPMSERVOW_CHANNEL0=0, ACTUATORSETTINGS_CCPMSERVOW_CHANNEL1=1, ACTUATORSETTINGS_CCPMSERVOW_CHANNEL2=2, ACTUATORSETTINGS_CCPMSERVOW_CHANNEL3=3, ACTUATORSETTINGS_CCPMSERVOW_CHANNEL4=4, ACTUATORSETTINGS_CCPMSERVOW_CHANNEL5=5, ACTUATORSETTINGS_CCPMSERVOW_CHANNEL6=6, ACTUATORSETTINGS_CCPMSERVOW_CHANNEL7=7, ACTUATORSETTINGS_CCPMSERVOW_NONE=8 } ActuatorSettingsCCPMServoWOptions; +// Field CCPMServoX information +/* Enumeration options for field CCPMServoX */ +typedef enum { ACTUATORSETTINGS_CCPMSERVOX_CHANNEL0=0, ACTUATORSETTINGS_CCPMSERVOX_CHANNEL1=1, ACTUATORSETTINGS_CCPMSERVOX_CHANNEL2=2, ACTUATORSETTINGS_CCPMSERVOX_CHANNEL3=3, ACTUATORSETTINGS_CCPMSERVOX_CHANNEL4=4, ACTUATORSETTINGS_CCPMSERVOX_CHANNEL5=5, ACTUATORSETTINGS_CCPMSERVOX_CHANNEL6=6, ACTUATORSETTINGS_CCPMSERVOX_CHANNEL7=7, ACTUATORSETTINGS_CCPMSERVOX_NONE=8 } ActuatorSettingsCCPMServoXOptions; +// Field CCPMServoY information +/* Enumeration options for field CCPMServoY */ +typedef enum { ACTUATORSETTINGS_CCPMSERVOY_CHANNEL0=0, ACTUATORSETTINGS_CCPMSERVOY_CHANNEL1=1, ACTUATORSETTINGS_CCPMSERVOY_CHANNEL2=2, ACTUATORSETTINGS_CCPMSERVOY_CHANNEL3=3, ACTUATORSETTINGS_CCPMSERVOY_CHANNEL4=4, ACTUATORSETTINGS_CCPMSERVOY_CHANNEL5=5, ACTUATORSETTINGS_CCPMSERVOY_CHANNEL6=6, ACTUATORSETTINGS_CCPMSERVOY_CHANNEL7=7, ACTUATORSETTINGS_CCPMSERVOY_NONE=8 } ActuatorSettingsCCPMServoYOptions; +// Field CCPMServoZ information +/* Enumeration options for field CCPMServoZ */ +typedef enum { ACTUATORSETTINGS_CCPMSERVOZ_CHANNEL0=0, ACTUATORSETTINGS_CCPMSERVOZ_CHANNEL1=1, ACTUATORSETTINGS_CCPMSERVOZ_CHANNEL2=2, ACTUATORSETTINGS_CCPMSERVOZ_CHANNEL3=3, ACTUATORSETTINGS_CCPMSERVOZ_CHANNEL4=4, ACTUATORSETTINGS_CCPMSERVOZ_CHANNEL5=5, ACTUATORSETTINGS_CCPMSERVOZ_CHANNEL6=6, ACTUATORSETTINGS_CCPMSERVOZ_CHANNEL7=7, ACTUATORSETTINGS_CCPMSERVOZ_NONE=8 } ActuatorSettingsCCPMServoZOptions; +// Field CCPMThrottle information +/* Enumeration options for field CCPMThrottle */ +typedef enum { ACTUATORSETTINGS_CCPMTHROTTLE_CHANNEL0=0, ACTUATORSETTINGS_CCPMTHROTTLE_CHANNEL1=1, ACTUATORSETTINGS_CCPMTHROTTLE_CHANNEL2=2, ACTUATORSETTINGS_CCPMTHROTTLE_CHANNEL3=3, ACTUATORSETTINGS_CCPMTHROTTLE_CHANNEL4=4, ACTUATORSETTINGS_CCPMTHROTTLE_CHANNEL5=5, ACTUATORSETTINGS_CCPMTHROTTLE_CHANNEL6=6, ACTUATORSETTINGS_CCPMTHROTTLE_CHANNEL7=7, ACTUATORSETTINGS_CCPMTHROTTLE_NONE=8 } ActuatorSettingsCCPMThrottleOptions; +// Field CCPMTailRotor information +/* Enumeration options for field CCPMTailRotor */ +typedef enum { ACTUATORSETTINGS_CCPMTAILROTOR_CHANNEL0=0, ACTUATORSETTINGS_CCPMTAILROTOR_CHANNEL1=1, ACTUATORSETTINGS_CCPMTAILROTOR_CHANNEL2=2, ACTUATORSETTINGS_CCPMTAILROTOR_CHANNEL3=3, ACTUATORSETTINGS_CCPMTAILROTOR_CHANNEL4=4, ACTUATORSETTINGS_CCPMTAILROTOR_CHANNEL5=5, ACTUATORSETTINGS_CCPMTAILROTOR_CHANNEL6=6, ACTUATORSETTINGS_CCPMTAILROTOR_CHANNEL7=7, ACTUATORSETTINGS_CCPMTAILROTOR_NONE=8 } ActuatorSettingsCCPMTailRotorOptions; // Field ChannelUpdateFreq information /* Number of elements for field ChannelUpdateFreq */ #define ACTUATORSETTINGS_CHANNELUPDATEFREQ_NUMELEM 2 diff --git a/flight/OpenPilot/UAVObjects/inc/systemsettings.h b/flight/OpenPilot/UAVObjects/inc/systemsettings.h index 8af2a6775..9e32dce66 100644 --- a/flight/OpenPilot/UAVObjects/inc/systemsettings.h +++ b/flight/OpenPilot/UAVObjects/inc/systemsettings.h @@ -64,7 +64,7 @@ typedef struct { // Field information // Field AirframeType information /* Enumeration options for field AirframeType */ -typedef enum { SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWING=0, SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWINGELEVON=1, SYSTEMSETTINGS_AIRFRAMETYPE_VTOL=2 } SystemSettingsAirframeTypeOptions; +typedef enum { SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWING=0, SYSTEMSETTINGS_AIRFRAMETYPE_FIXEDWINGELEVON=1, SYSTEMSETTINGS_AIRFRAMETYPE_VTOL=2, SYSTEMSETTINGS_AIRFRAMETYPE_HELICP=3 } SystemSettingsAirframeTypeOptions; // Generic interface functions diff --git a/ground/src/plugins/uavobjects/actuatorsettings.cpp b/ground/src/plugins/uavobjects/actuatorsettings.cpp index b0a3730e6..362f87435 100644 --- a/ground/src/plugins/uavobjects/actuatorsettings.cpp +++ b/ground/src/plugins/uavobjects/actuatorsettings.cpp @@ -224,6 +224,128 @@ ActuatorSettings::ActuatorSettings(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTI VTOLMotorNWEnumOptions.append("Channel7"); VTOLMotorNWEnumOptions.append("None"); fields.append( new UAVObjectField(QString("VTOLMotorNW"), QString("channel"), UAVObjectField::ENUM, VTOLMotorNWElemNames, VTOLMotorNWEnumOptions) ); + QStringList CCPMYawStabilizationInManualModeElemNames; + CCPMYawStabilizationInManualModeElemNames.append("0"); + QStringList CCPMYawStabilizationInManualModeEnumOptions; + CCPMYawStabilizationInManualModeEnumOptions.append("False"); + CCPMYawStabilizationInManualModeEnumOptions.append("True"); + fields.append( new UAVObjectField(QString("CCPMYawStabilizationInManualMode"), QString(""), UAVObjectField::ENUM, CCPMYawStabilizationInManualModeElemNames, CCPMYawStabilizationInManualModeEnumOptions) ); + QStringList CCPMFlybarlessElemNames; + CCPMFlybarlessElemNames.append("0"); + QStringList CCPMFlybarlessEnumOptions; + CCPMFlybarlessEnumOptions.append("False"); + CCPMFlybarlessEnumOptions.append("True"); + fields.append( new UAVObjectField(QString("CCPMFlybarless"), QString(""), UAVObjectField::ENUM, CCPMFlybarlessElemNames, CCPMFlybarlessEnumOptions) ); + QStringList CCPMThrottleCurveElemNames; + CCPMThrottleCurveElemNames.append("0"); + CCPMThrottleCurveElemNames.append("1"); + CCPMThrottleCurveElemNames.append("2"); + CCPMThrottleCurveElemNames.append("3"); + CCPMThrottleCurveElemNames.append("4"); + fields.append( new UAVObjectField(QString("CCPMThrottleCurve"), QString("percent"), UAVObjectField::FLOAT32, CCPMThrottleCurveElemNames, QStringList()) ); + QStringList CCPMPitchCurveElemNames; + CCPMPitchCurveElemNames.append("0"); + CCPMPitchCurveElemNames.append("1"); + CCPMPitchCurveElemNames.append("2"); + CCPMPitchCurveElemNames.append("3"); + CCPMPitchCurveElemNames.append("4"); + fields.append( new UAVObjectField(QString("CCPMPitchCurve"), QString("percent"), UAVObjectField::FLOAT32, CCPMPitchCurveElemNames, QStringList()) ); + QStringList CCPMCollectiveConstantElemNames; + CCPMCollectiveConstantElemNames.append("0"); + fields.append( new UAVObjectField(QString("CCPMCollectiveConstant"), QString("multiplier (0.0 -> 1.0)"), UAVObjectField::FLOAT32, CCPMCollectiveConstantElemNames, QStringList()) ); + QStringList CCPMCorrectionAngleElemNames; + CCPMCorrectionAngleElemNames.append("0"); + fields.append( new UAVObjectField(QString("CCPMCorrectionAngle"), QString("degrees"), UAVObjectField::FLOAT32, CCPMCorrectionAngleElemNames, QStringList()) ); + QStringList CCPMAngleWElemNames; + CCPMAngleWElemNames.append("0"); + fields.append( new UAVObjectField(QString("CCPMAngleW"), QString("degrees"), UAVObjectField::FLOAT32, CCPMAngleWElemNames, QStringList()) ); + QStringList CCPMAngleXElemNames; + CCPMAngleXElemNames.append("0"); + fields.append( new UAVObjectField(QString("CCPMAngleX"), QString("degrees"), UAVObjectField::FLOAT32, CCPMAngleXElemNames, QStringList()) ); + QStringList CCPMAngleYElemNames; + CCPMAngleYElemNames.append("0"); + fields.append( new UAVObjectField(QString("CCPMAngleY"), QString("degrees"), UAVObjectField::FLOAT32, CCPMAngleYElemNames, QStringList()) ); + QStringList CCPMAngleZElemNames; + CCPMAngleZElemNames.append("0"); + fields.append( new UAVObjectField(QString("CCPMAngleZ"), QString("degrees"), UAVObjectField::FLOAT32, CCPMAngleZElemNames, QStringList()) ); + QStringList CCPMServoWElemNames; + CCPMServoWElemNames.append("0"); + QStringList CCPMServoWEnumOptions; + CCPMServoWEnumOptions.append("Channel0"); + CCPMServoWEnumOptions.append("Channel1"); + CCPMServoWEnumOptions.append("Channel2"); + CCPMServoWEnumOptions.append("Channel3"); + CCPMServoWEnumOptions.append("Channel4"); + CCPMServoWEnumOptions.append("Channel5"); + CCPMServoWEnumOptions.append("Channel6"); + CCPMServoWEnumOptions.append("Channel7"); + CCPMServoWEnumOptions.append("None"); + fields.append( new UAVObjectField(QString("CCPMServoW"), QString("channel"), UAVObjectField::ENUM, CCPMServoWElemNames, CCPMServoWEnumOptions) ); + QStringList CCPMServoXElemNames; + CCPMServoXElemNames.append("0"); + QStringList CCPMServoXEnumOptions; + CCPMServoXEnumOptions.append("Channel0"); + CCPMServoXEnumOptions.append("Channel1"); + CCPMServoXEnumOptions.append("Channel2"); + CCPMServoXEnumOptions.append("Channel3"); + CCPMServoXEnumOptions.append("Channel4"); + CCPMServoXEnumOptions.append("Channel5"); + CCPMServoXEnumOptions.append("Channel6"); + CCPMServoXEnumOptions.append("Channel7"); + CCPMServoXEnumOptions.append("None"); + fields.append( new UAVObjectField(QString("CCPMServoX"), QString("channel"), UAVObjectField::ENUM, CCPMServoXElemNames, CCPMServoXEnumOptions) ); + QStringList CCPMServoYElemNames; + CCPMServoYElemNames.append("0"); + QStringList CCPMServoYEnumOptions; + CCPMServoYEnumOptions.append("Channel0"); + CCPMServoYEnumOptions.append("Channel1"); + CCPMServoYEnumOptions.append("Channel2"); + CCPMServoYEnumOptions.append("Channel3"); + CCPMServoYEnumOptions.append("Channel4"); + CCPMServoYEnumOptions.append("Channel5"); + CCPMServoYEnumOptions.append("Channel6"); + CCPMServoYEnumOptions.append("Channel7"); + CCPMServoYEnumOptions.append("None"); + fields.append( new UAVObjectField(QString("CCPMServoY"), QString("channel"), UAVObjectField::ENUM, CCPMServoYElemNames, CCPMServoYEnumOptions) ); + QStringList CCPMServoZElemNames; + CCPMServoZElemNames.append("0"); + QStringList CCPMServoZEnumOptions; + CCPMServoZEnumOptions.append("Channel0"); + CCPMServoZEnumOptions.append("Channel1"); + CCPMServoZEnumOptions.append("Channel2"); + CCPMServoZEnumOptions.append("Channel3"); + CCPMServoZEnumOptions.append("Channel4"); + CCPMServoZEnumOptions.append("Channel5"); + CCPMServoZEnumOptions.append("Channel6"); + CCPMServoZEnumOptions.append("Channel7"); + CCPMServoZEnumOptions.append("None"); + fields.append( new UAVObjectField(QString("CCPMServoZ"), QString("channel"), UAVObjectField::ENUM, CCPMServoZElemNames, CCPMServoZEnumOptions) ); + QStringList CCPMThrottleElemNames; + CCPMThrottleElemNames.append("0"); + QStringList CCPMThrottleEnumOptions; + CCPMThrottleEnumOptions.append("Channel0"); + CCPMThrottleEnumOptions.append("Channel1"); + CCPMThrottleEnumOptions.append("Channel2"); + CCPMThrottleEnumOptions.append("Channel3"); + CCPMThrottleEnumOptions.append("Channel4"); + CCPMThrottleEnumOptions.append("Channel5"); + CCPMThrottleEnumOptions.append("Channel6"); + CCPMThrottleEnumOptions.append("Channel7"); + CCPMThrottleEnumOptions.append("None"); + fields.append( new UAVObjectField(QString("CCPMThrottle"), QString("channel"), UAVObjectField::ENUM, CCPMThrottleElemNames, CCPMThrottleEnumOptions) ); + QStringList CCPMTailRotorElemNames; + CCPMTailRotorElemNames.append("0"); + QStringList CCPMTailRotorEnumOptions; + CCPMTailRotorEnumOptions.append("Channel0"); + CCPMTailRotorEnumOptions.append("Channel1"); + CCPMTailRotorEnumOptions.append("Channel2"); + CCPMTailRotorEnumOptions.append("Channel3"); + CCPMTailRotorEnumOptions.append("Channel4"); + CCPMTailRotorEnumOptions.append("Channel5"); + CCPMTailRotorEnumOptions.append("Channel6"); + CCPMTailRotorEnumOptions.append("Channel7"); + CCPMTailRotorEnumOptions.append("None"); + fields.append( new UAVObjectField(QString("CCPMTailRotor"), QString("channel"), UAVObjectField::ENUM, CCPMTailRotorElemNames, CCPMTailRotorEnumOptions) ); QStringList ChannelUpdateFreqElemNames; ChannelUpdateFreqElemNames.append("0"); ChannelUpdateFreqElemNames.append("1"); @@ -305,6 +427,30 @@ void ActuatorSettings::setDefaultFieldValues() data.VTOLMotorSW = 8; data.VTOLMotorW = 8; data.VTOLMotorNW = 8; + data.CCPMYawStabilizationInManualMode = 0; + data.CCPMFlybarless = 0; + data.CCPMThrottleCurve[0] = 0; + data.CCPMThrottleCurve[1] = 0; + data.CCPMThrottleCurve[2] = 0; + data.CCPMThrottleCurve[3] = 0; + data.CCPMThrottleCurve[4] = 0; + data.CCPMPitchCurve[0] = 0; + data.CCPMPitchCurve[1] = 0; + data.CCPMPitchCurve[2] = 0; + data.CCPMPitchCurve[3] = 0; + data.CCPMPitchCurve[4] = 0; + data.CCPMCollectiveConstant = 0.5; + data.CCPMCorrectionAngle = 0; + data.CCPMAngleW = 0; + data.CCPMAngleX = 60; + data.CCPMAngleY = 180; + data.CCPMAngleZ = 300; + data.CCPMServoW = 8; + data.CCPMServoX = 8; + data.CCPMServoY = 8; + data.CCPMServoZ = 8; + data.CCPMThrottle = 8; + data.CCPMTailRotor = 8; data.ChannelUpdateFreq[0] = 50; data.ChannelUpdateFreq[1] = 50; data.ChannelMax[0] = 2000; diff --git a/ground/src/plugins/uavobjects/actuatorsettings.h b/ground/src/plugins/uavobjects/actuatorsettings.h index d307d27ab..83d38298a 100644 --- a/ground/src/plugins/uavobjects/actuatorsettings.h +++ b/ground/src/plugins/uavobjects/actuatorsettings.h @@ -57,6 +57,22 @@ public: quint8 VTOLMotorSW; quint8 VTOLMotorW; quint8 VTOLMotorNW; + quint8 CCPMYawStabilizationInManualMode; + quint8 CCPMFlybarless; + float CCPMThrottleCurve[5]; + float CCPMPitchCurve[5]; + float CCPMCollectiveConstant; + float CCPMCorrectionAngle; + float CCPMAngleW; + float CCPMAngleX; + float CCPMAngleY; + float CCPMAngleZ; + quint8 CCPMServoW; + quint8 CCPMServoX; + quint8 CCPMServoY; + quint8 CCPMServoZ; + quint8 CCPMThrottle; + quint8 CCPMTailRotor; qint16 ChannelUpdateFreq[2]; qint16 ChannelMax[8]; qint16 ChannelNeutral[8]; @@ -107,6 +123,42 @@ public: // Field VTOLMotorNW information /* Enumeration options for field VTOLMotorNW */ typedef enum { VTOLMOTORNW_CHANNEL0=0, VTOLMOTORNW_CHANNEL1=1, VTOLMOTORNW_CHANNEL2=2, VTOLMOTORNW_CHANNEL3=3, VTOLMOTORNW_CHANNEL4=4, VTOLMOTORNW_CHANNEL5=5, VTOLMOTORNW_CHANNEL6=6, VTOLMOTORNW_CHANNEL7=7, VTOLMOTORNW_NONE=8 } VTOLMotorNWOptions; + // Field CCPMYawStabilizationInManualMode information + /* Enumeration options for field CCPMYawStabilizationInManualMode */ + typedef enum { CCPMYAWSTABILIZATIONINMANUALMODE_FALSE=0, CCPMYAWSTABILIZATIONINMANUALMODE_TRUE=1 } CCPMYawStabilizationInManualModeOptions; + // Field CCPMFlybarless information + /* Enumeration options for field CCPMFlybarless */ + typedef enum { CCPMFLYBARLESS_FALSE=0, CCPMFLYBARLESS_TRUE=1 } CCPMFlybarlessOptions; + // Field CCPMThrottleCurve information + /* Number of elements for field CCPMThrottleCurve */ + static const quint32 CCPMTHROTTLECURVE_NUMELEM = 5; + // Field CCPMPitchCurve information + /* Number of elements for field CCPMPitchCurve */ + static const quint32 CCPMPITCHCURVE_NUMELEM = 5; + // Field CCPMCollectiveConstant information + // Field CCPMCorrectionAngle information + // Field CCPMAngleW information + // Field CCPMAngleX information + // Field CCPMAngleY information + // Field CCPMAngleZ information + // Field CCPMServoW information + /* Enumeration options for field CCPMServoW */ + typedef enum { CCPMSERVOW_CHANNEL0=0, CCPMSERVOW_CHANNEL1=1, CCPMSERVOW_CHANNEL2=2, CCPMSERVOW_CHANNEL3=3, CCPMSERVOW_CHANNEL4=4, CCPMSERVOW_CHANNEL5=5, CCPMSERVOW_CHANNEL6=6, CCPMSERVOW_CHANNEL7=7, CCPMSERVOW_NONE=8 } CCPMServoWOptions; + // Field CCPMServoX information + /* Enumeration options for field CCPMServoX */ + typedef enum { CCPMSERVOX_CHANNEL0=0, CCPMSERVOX_CHANNEL1=1, CCPMSERVOX_CHANNEL2=2, CCPMSERVOX_CHANNEL3=3, CCPMSERVOX_CHANNEL4=4, CCPMSERVOX_CHANNEL5=5, CCPMSERVOX_CHANNEL6=6, CCPMSERVOX_CHANNEL7=7, CCPMSERVOX_NONE=8 } CCPMServoXOptions; + // Field CCPMServoY information + /* Enumeration options for field CCPMServoY */ + typedef enum { CCPMSERVOY_CHANNEL0=0, CCPMSERVOY_CHANNEL1=1, CCPMSERVOY_CHANNEL2=2, CCPMSERVOY_CHANNEL3=3, CCPMSERVOY_CHANNEL4=4, CCPMSERVOY_CHANNEL5=5, CCPMSERVOY_CHANNEL6=6, CCPMSERVOY_CHANNEL7=7, CCPMSERVOY_NONE=8 } CCPMServoYOptions; + // Field CCPMServoZ information + /* Enumeration options for field CCPMServoZ */ + typedef enum { CCPMSERVOZ_CHANNEL0=0, CCPMSERVOZ_CHANNEL1=1, CCPMSERVOZ_CHANNEL2=2, CCPMSERVOZ_CHANNEL3=3, CCPMSERVOZ_CHANNEL4=4, CCPMSERVOZ_CHANNEL5=5, CCPMSERVOZ_CHANNEL6=6, CCPMSERVOZ_CHANNEL7=7, CCPMSERVOZ_NONE=8 } CCPMServoZOptions; + // Field CCPMThrottle information + /* Enumeration options for field CCPMThrottle */ + typedef enum { CCPMTHROTTLE_CHANNEL0=0, CCPMTHROTTLE_CHANNEL1=1, CCPMTHROTTLE_CHANNEL2=2, CCPMTHROTTLE_CHANNEL3=3, CCPMTHROTTLE_CHANNEL4=4, CCPMTHROTTLE_CHANNEL5=5, CCPMTHROTTLE_CHANNEL6=6, CCPMTHROTTLE_CHANNEL7=7, CCPMTHROTTLE_NONE=8 } CCPMThrottleOptions; + // Field CCPMTailRotor information + /* Enumeration options for field CCPMTailRotor */ + typedef enum { CCPMTAILROTOR_CHANNEL0=0, CCPMTAILROTOR_CHANNEL1=1, CCPMTAILROTOR_CHANNEL2=2, CCPMTAILROTOR_CHANNEL3=3, CCPMTAILROTOR_CHANNEL4=4, CCPMTAILROTOR_CHANNEL5=5, CCPMTAILROTOR_CHANNEL6=6, CCPMTAILROTOR_CHANNEL7=7, CCPMTAILROTOR_NONE=8 } CCPMTailRotorOptions; // Field ChannelUpdateFreq information /* Number of elements for field ChannelUpdateFreq */ static const quint32 CHANNELUPDATEFREQ_NUMELEM = 2; @@ -122,7 +174,7 @@ public: // Constants - static const quint32 OBJID = 3054509114U; + static const quint32 OBJID = 3352303420U; static const QString NAME; static const bool ISSINGLEINST = 1; static const bool ISSETTINGS = 1; diff --git a/ground/src/plugins/uavobjects/actuatorsettings.py b/ground/src/plugins/uavobjects/actuatorsettings.py index 3ec6cb061..b51b162f2 100644 --- a/ground/src/plugins/uavobjects/actuatorsettings.py +++ b/ground/src/plugins/uavobjects/actuatorsettings.py @@ -303,6 +303,232 @@ _fields = [ \ '8' : 'None', } ), + uavobject.UAVObjectField( + 'CCPMYawStabilizationInManualMode', + 'b', + 1, + [ + '0', + ], + { + '0' : 'False', + '1' : 'True', + } + ), + uavobject.UAVObjectField( + 'CCPMFlybarless', + 'b', + 1, + [ + '0', + ], + { + '0' : 'False', + '1' : 'True', + } + ), + uavobject.UAVObjectField( + 'CCPMThrottleCurve', + 'f', + 5, + [ + '0', + '1', + '2', + '3', + '4', + ], + { + } + ), + uavobject.UAVObjectField( + 'CCPMPitchCurve', + 'f', + 5, + [ + '0', + '1', + '2', + '3', + '4', + ], + { + } + ), + uavobject.UAVObjectField( + 'CCPMCollectiveConstant', + 'f', + 1, + [ + '0', + ], + { + } + ), + uavobject.UAVObjectField( + 'CCPMCorrectionAngle', + 'f', + 1, + [ + '0', + ], + { + } + ), + uavobject.UAVObjectField( + 'CCPMAngleW', + 'f', + 1, + [ + '0', + ], + { + } + ), + uavobject.UAVObjectField( + 'CCPMAngleX', + 'f', + 1, + [ + '0', + ], + { + } + ), + uavobject.UAVObjectField( + 'CCPMAngleY', + 'f', + 1, + [ + '0', + ], + { + } + ), + uavobject.UAVObjectField( + 'CCPMAngleZ', + 'f', + 1, + [ + '0', + ], + { + } + ), + uavobject.UAVObjectField( + 'CCPMServoW', + 'b', + 1, + [ + '0', + ], + { + '0' : 'Channel0', + '1' : 'Channel1', + '2' : 'Channel2', + '3' : 'Channel3', + '4' : 'Channel4', + '5' : 'Channel5', + '6' : 'Channel6', + '7' : 'Channel7', + '8' : 'None', + } + ), + uavobject.UAVObjectField( + 'CCPMServoX', + 'b', + 1, + [ + '0', + ], + { + '0' : 'Channel0', + '1' : 'Channel1', + '2' : 'Channel2', + '3' : 'Channel3', + '4' : 'Channel4', + '5' : 'Channel5', + '6' : 'Channel6', + '7' : 'Channel7', + '8' : 'None', + } + ), + uavobject.UAVObjectField( + 'CCPMServoY', + 'b', + 1, + [ + '0', + ], + { + '0' : 'Channel0', + '1' : 'Channel1', + '2' : 'Channel2', + '3' : 'Channel3', + '4' : 'Channel4', + '5' : 'Channel5', + '6' : 'Channel6', + '7' : 'Channel7', + '8' : 'None', + } + ), + uavobject.UAVObjectField( + 'CCPMServoZ', + 'b', + 1, + [ + '0', + ], + { + '0' : 'Channel0', + '1' : 'Channel1', + '2' : 'Channel2', + '3' : 'Channel3', + '4' : 'Channel4', + '5' : 'Channel5', + '6' : 'Channel6', + '7' : 'Channel7', + '8' : 'None', + } + ), + uavobject.UAVObjectField( + 'CCPMThrottle', + 'b', + 1, + [ + '0', + ], + { + '0' : 'Channel0', + '1' : 'Channel1', + '2' : 'Channel2', + '3' : 'Channel3', + '4' : 'Channel4', + '5' : 'Channel5', + '6' : 'Channel6', + '7' : 'Channel7', + '8' : 'None', + } + ), + uavobject.UAVObjectField( + 'CCPMTailRotor', + 'b', + 1, + [ + '0', + ], + { + '0' : 'Channel0', + '1' : 'Channel1', + '2' : 'Channel2', + '3' : 'Channel3', + '4' : 'Channel4', + '5' : 'Channel5', + '6' : 'Channel6', + '7' : 'Channel7', + '8' : 'None', + } + ), uavobject.UAVObjectField( 'ChannelUpdateFreq', 'h', @@ -370,7 +596,7 @@ _fields = [ \ class ActuatorSettings(uavobject.UAVObject): ## Object constants - OBJID = 3054509114 + OBJID = 3352303420 NAME = "ActuatorSettings" METANAME = "ActuatorSettingsMeta" ISSINGLEINST = 1 diff --git a/ground/src/plugins/uavobjects/systemsettings.cpp b/ground/src/plugins/uavobjects/systemsettings.cpp index 19a7add97..8bd3ae29b 100644 --- a/ground/src/plugins/uavobjects/systemsettings.cpp +++ b/ground/src/plugins/uavobjects/systemsettings.cpp @@ -48,6 +48,7 @@ SystemSettings::SystemSettings(): UAVDataObject(OBJID, ISSINGLEINST, ISSETTINGS, AirframeTypeEnumOptions.append("FixedWing"); AirframeTypeEnumOptions.append("FixedWingElevon"); AirframeTypeEnumOptions.append("VTOL"); + AirframeTypeEnumOptions.append("HeliCP"); fields.append( new UAVObjectField(QString("AirframeType"), QString(""), UAVObjectField::ENUM, AirframeTypeElemNames, AirframeTypeEnumOptions) ); // Initialize object diff --git a/ground/src/plugins/uavobjects/systemsettings.h b/ground/src/plugins/uavobjects/systemsettings.h index a9aeb68cc..4fb4736a6 100644 --- a/ground/src/plugins/uavobjects/systemsettings.h +++ b/ground/src/plugins/uavobjects/systemsettings.h @@ -50,7 +50,7 @@ public: // Field information // Field AirframeType information /* Enumeration options for field AirframeType */ - typedef enum { AIRFRAMETYPE_FIXEDWING=0, AIRFRAMETYPE_FIXEDWINGELEVON=1, AIRFRAMETYPE_VTOL=2 } AirframeTypeOptions; + typedef enum { AIRFRAMETYPE_FIXEDWING=0, AIRFRAMETYPE_FIXEDWINGELEVON=1, AIRFRAMETYPE_VTOL=2, AIRFRAMETYPE_HELICP=3 } AirframeTypeOptions; // Constants diff --git a/ground/src/plugins/uavobjects/systemsettings.py b/ground/src/plugins/uavobjects/systemsettings.py index 0b3d7bdb2..c802d10e3 100644 --- a/ground/src/plugins/uavobjects/systemsettings.py +++ b/ground/src/plugins/uavobjects/systemsettings.py @@ -48,6 +48,7 @@ _fields = [ \ '0' : 'FixedWing', '1' : 'FixedWingElevon', '2' : 'VTOL', + '3' : 'HeliCP', } ), ] diff --git a/ground/src/shared/uavobjectdefinition/actuatorsettings.xml b/ground/src/shared/uavobjectdefinition/actuatorsettings.xml index 3cffb7c3d..cbc8bafd4 100644 --- a/ground/src/shared/uavobjectdefinition/actuatorsettings.xml +++ b/ground/src/shared/uavobjectdefinition/actuatorsettings.xml @@ -14,6 +14,22 @@ + + + + + + + + + + + + + + + + diff --git a/ground/src/shared/uavobjectdefinition/systemsettings.xml b/ground/src/shared/uavobjectdefinition/systemsettings.xml index 6c3997808..4ab6d0f0d 100644 --- a/ground/src/shared/uavobjectdefinition/systemsettings.xml +++ b/ground/src/shared/uavobjectdefinition/systemsettings.xml @@ -1,6 +1,6 @@ - +