mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
Settings additions.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2274 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
d72d4fa4d2
commit
d072c30ba1
@ -41,7 +41,7 @@
|
|||||||
#define PIPXTREMEMODEMSETTINGS_H
|
#define PIPXTREMEMODEMSETTINGS_H
|
||||||
|
|
||||||
// Object constants
|
// Object constants
|
||||||
#define PIPXTREMEMODEMSETTINGS_OBJID 3822692478U
|
#define PIPXTREMEMODEMSETTINGS_OBJID 444830632U
|
||||||
#define PIPXTREMEMODEMSETTINGS_NAME "PipXtremeModemSettings"
|
#define PIPXTREMEMODEMSETTINGS_NAME "PipXtremeModemSettings"
|
||||||
#define PIPXTREMEMODEMSETTINGS_METANAME "PipXtremeModemSettingsMeta"
|
#define PIPXTREMEMODEMSETTINGS_METANAME "PipXtremeModemSettingsMeta"
|
||||||
#define PIPXTREMEMODEMSETTINGS_ISSINGLEINST 1
|
#define PIPXTREMEMODEMSETTINGS_ISSINGLEINST 1
|
||||||
@ -79,6 +79,7 @@ typedef struct {
|
|||||||
uint32_t Frequency;
|
uint32_t Frequency;
|
||||||
uint8_t Max_RF_Bandwidth;
|
uint8_t Max_RF_Bandwidth;
|
||||||
uint8_t Max_Tx_Power;
|
uint8_t Max_Tx_Power;
|
||||||
|
uint8_t Tx_Data_Wait;
|
||||||
uint8_t AES_Encryption;
|
uint8_t AES_Encryption;
|
||||||
uint8_t AES_EncryptionKey[16];
|
uint8_t AES_EncryptionKey[16];
|
||||||
uint32_t Paired_Serial_Number;
|
uint32_t Paired_Serial_Number;
|
||||||
@ -102,6 +103,7 @@ typedef enum { PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_500=0, PIPXTREMEMODEMSETT
|
|||||||
// Field Max_Tx_Power information
|
// Field Max_Tx_Power information
|
||||||
/* Enumeration options for field Max_Tx_Power */
|
/* Enumeration options for field Max_Tx_Power */
|
||||||
typedef enum { PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_1=0, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_2=1, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_5=2, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_8=3, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_11=4, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_14=5, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_17=6, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_20=7 } PipXtremeModemSettingsMax_Tx_PowerOptions;
|
typedef enum { PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_1=0, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_2=1, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_5=2, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_8=3, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_11=4, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_14=5, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_17=6, PIPXTREMEMODEMSETTINGS_MAX_TX_POWER_20=7 } PipXtremeModemSettingsMax_Tx_PowerOptions;
|
||||||
|
// Field Tx_Data_Wait information
|
||||||
// Field AES_Encryption information
|
// Field AES_Encryption information
|
||||||
/* Enumeration options for field AES_Encryption */
|
/* Enumeration options for field AES_Encryption */
|
||||||
typedef enum { PIPXTREMEMODEMSETTINGS_AES_ENCRYPTION_FALSE=0, PIPXTREMEMODEMSETTINGS_AES_ENCRYPTION_TRUE=1 } PipXtremeModemSettingsAES_EncryptionOptions;
|
typedef enum { PIPXTREMEMODEMSETTINGS_AES_ENCRYPTION_FALSE=0, PIPXTREMEMODEMSETTINGS_AES_ENCRYPTION_TRUE=1 } PipXtremeModemSettingsAES_EncryptionOptions;
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
#define PIPXTREMEMODEMSTATUS_H
|
#define PIPXTREMEMODEMSTATUS_H
|
||||||
|
|
||||||
// Object constants
|
// Object constants
|
||||||
#define PIPXTREMEMODEMSTATUS_OBJID 539085060U
|
#define PIPXTREMEMODEMSTATUS_OBJID 2490854928U
|
||||||
#define PIPXTREMEMODEMSTATUS_NAME "PipXtremeModemStatus"
|
#define PIPXTREMEMODEMSTATUS_NAME "PipXtremeModemStatus"
|
||||||
#define PIPXTREMEMODEMSTATUS_METANAME "PipXtremeModemStatusMeta"
|
#define PIPXTREMEMODEMSTATUS_METANAME "PipXtremeModemStatusMeta"
|
||||||
#define PIPXTREMEMODEMSTATUS_ISSINGLEINST 1
|
#define PIPXTREMEMODEMSTATUS_ISSINGLEINST 1
|
||||||
@ -71,6 +71,8 @@
|
|||||||
|
|
||||||
// Object data
|
// Object data
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
uint8_t Firmware_Version_Major;
|
||||||
|
uint8_t Firmware_Version_Minor;
|
||||||
uint32_t Serial_Number;
|
uint32_t Serial_Number;
|
||||||
uint32_t Up_Time;
|
uint32_t Up_Time;
|
||||||
uint32_t Frequency;
|
uint32_t Frequency;
|
||||||
@ -84,6 +86,8 @@ typedef struct {
|
|||||||
} __attribute__((packed)) PipXtremeModemStatusData;
|
} __attribute__((packed)) PipXtremeModemStatusData;
|
||||||
|
|
||||||
// Field information
|
// Field information
|
||||||
|
// Field Firmware_Version_Major information
|
||||||
|
// Field Firmware_Version_Minor information
|
||||||
// Field Serial_Number information
|
// Field Serial_Number information
|
||||||
// Field Up_Time information
|
// Field Up_Time information
|
||||||
// Field Frequency information
|
// Field Frequency information
|
||||||
|
@ -88,6 +88,7 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId)
|
|||||||
data.Frequency = 0;
|
data.Frequency = 0;
|
||||||
data.Max_RF_Bandwidth = 11;
|
data.Max_RF_Bandwidth = 11;
|
||||||
data.Max_Tx_Power = 4;
|
data.Max_Tx_Power = 4;
|
||||||
|
data.Tx_Data_Wait = 10;
|
||||||
data.AES_Encryption = 0;
|
data.AES_Encryption = 0;
|
||||||
data.AES_EncryptionKey[0] = 0;
|
data.AES_EncryptionKey[0] = 0;
|
||||||
data.AES_EncryptionKey[1] = 0;
|
data.AES_EncryptionKey[1] = 0;
|
||||||
|
@ -80,6 +80,8 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId)
|
|||||||
// Initialize object fields to their default values
|
// Initialize object fields to their default values
|
||||||
UAVObjGetInstanceData(obj, instId, &data);
|
UAVObjGetInstanceData(obj, instId, &data);
|
||||||
memset(&data, 0, sizeof(PipXtremeModemStatusData));
|
memset(&data, 0, sizeof(PipXtremeModemStatusData));
|
||||||
|
data.Firmware_Version_Major = 0;
|
||||||
|
data.Firmware_Version_Minor = 0;
|
||||||
data.Serial_Number = 0;
|
data.Serial_Number = 0;
|
||||||
|
|
||||||
UAVObjSetInstanceData(obj, instId, &data);
|
UAVObjSetInstanceData(obj, instId, &data);
|
||||||
|
@ -104,6 +104,9 @@ PipXtremeModemSettings::PipXtremeModemSettings(): UAVDataObject(OBJID, ISSINGLEI
|
|||||||
Max_Tx_PowerEnumOptions.append("17");
|
Max_Tx_PowerEnumOptions.append("17");
|
||||||
Max_Tx_PowerEnumOptions.append("20");
|
Max_Tx_PowerEnumOptions.append("20");
|
||||||
fields.append( new UAVObjectField(QString("Max_Tx_Power"), QString("dBm"), UAVObjectField::ENUM, Max_Tx_PowerElemNames, Max_Tx_PowerEnumOptions) );
|
fields.append( new UAVObjectField(QString("Max_Tx_Power"), QString("dBm"), UAVObjectField::ENUM, Max_Tx_PowerElemNames, Max_Tx_PowerEnumOptions) );
|
||||||
|
QStringList Tx_Data_WaitElemNames;
|
||||||
|
Tx_Data_WaitElemNames.append("0");
|
||||||
|
fields.append( new UAVObjectField(QString("Tx_Data_Wait"), QString("ms"), UAVObjectField::UINT8, Tx_Data_WaitElemNames, QStringList()) );
|
||||||
QStringList AES_EncryptionElemNames;
|
QStringList AES_EncryptionElemNames;
|
||||||
AES_EncryptionElemNames.append("0");
|
AES_EncryptionElemNames.append("0");
|
||||||
QStringList AES_EncryptionEnumOptions;
|
QStringList AES_EncryptionEnumOptions;
|
||||||
@ -174,6 +177,7 @@ void PipXtremeModemSettings::setDefaultFieldValues()
|
|||||||
data.Frequency = 0;
|
data.Frequency = 0;
|
||||||
data.Max_RF_Bandwidth = 11;
|
data.Max_RF_Bandwidth = 11;
|
||||||
data.Max_Tx_Power = 4;
|
data.Max_Tx_Power = 4;
|
||||||
|
data.Tx_Data_Wait = 10;
|
||||||
data.AES_Encryption = 0;
|
data.AES_Encryption = 0;
|
||||||
data.AES_EncryptionKey[0] = 0;
|
data.AES_EncryptionKey[0] = 0;
|
||||||
data.AES_EncryptionKey[1] = 0;
|
data.AES_EncryptionKey[1] = 0;
|
||||||
|
@ -51,6 +51,7 @@ public:
|
|||||||
quint32 Frequency;
|
quint32 Frequency;
|
||||||
quint8 Max_RF_Bandwidth;
|
quint8 Max_RF_Bandwidth;
|
||||||
quint8 Max_Tx_Power;
|
quint8 Max_Tx_Power;
|
||||||
|
quint8 Tx_Data_Wait;
|
||||||
quint8 AES_Encryption;
|
quint8 AES_Encryption;
|
||||||
quint8 AES_EncryptionKey[16];
|
quint8 AES_EncryptionKey[16];
|
||||||
quint32 Paired_Serial_Number;
|
quint32 Paired_Serial_Number;
|
||||||
@ -74,6 +75,7 @@ public:
|
|||||||
// Field Max_Tx_Power information
|
// Field Max_Tx_Power information
|
||||||
/* Enumeration options for field Max_Tx_Power */
|
/* Enumeration options for field Max_Tx_Power */
|
||||||
typedef enum { MAX_TX_POWER_1=0, MAX_TX_POWER_2=1, MAX_TX_POWER_5=2, MAX_TX_POWER_8=3, MAX_TX_POWER_11=4, MAX_TX_POWER_14=5, MAX_TX_POWER_17=6, MAX_TX_POWER_20=7 } Max_Tx_PowerOptions;
|
typedef enum { MAX_TX_POWER_1=0, MAX_TX_POWER_2=1, MAX_TX_POWER_5=2, MAX_TX_POWER_8=3, MAX_TX_POWER_11=4, MAX_TX_POWER_14=5, MAX_TX_POWER_17=6, MAX_TX_POWER_20=7 } Max_Tx_PowerOptions;
|
||||||
|
// Field Tx_Data_Wait information
|
||||||
// Field AES_Encryption information
|
// Field AES_Encryption information
|
||||||
/* Enumeration options for field AES_Encryption */
|
/* Enumeration options for field AES_Encryption */
|
||||||
typedef enum { AES_ENCRYPTION_FALSE=0, AES_ENCRYPTION_TRUE=1 } AES_EncryptionOptions;
|
typedef enum { AES_ENCRYPTION_FALSE=0, AES_ENCRYPTION_TRUE=1 } AES_EncryptionOptions;
|
||||||
@ -84,7 +86,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
static const quint32 OBJID = 3822692478U;
|
static const quint32 OBJID = 444830632U;
|
||||||
static const QString NAME;
|
static const QString NAME;
|
||||||
static const QString DESCRIPTION;
|
static const QString DESCRIPTION;
|
||||||
static const bool ISSINGLEINST = 1;
|
static const bool ISSINGLEINST = 1;
|
||||||
|
@ -150,6 +150,16 @@ _fields = [ \
|
|||||||
'7' : '20',
|
'7' : '20',
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
uavobject.UAVObjectField(
|
||||||
|
'Tx_Data_Wait',
|
||||||
|
'B',
|
||||||
|
1,
|
||||||
|
[
|
||||||
|
'0',
|
||||||
|
],
|
||||||
|
{
|
||||||
|
}
|
||||||
|
),
|
||||||
uavobject.UAVObjectField(
|
uavobject.UAVObjectField(
|
||||||
'AES_Encryption',
|
'AES_Encryption',
|
||||||
'b',
|
'b',
|
||||||
@ -202,7 +212,7 @@ _fields = [ \
|
|||||||
|
|
||||||
class PipXtremeModemSettings(uavobject.UAVObject):
|
class PipXtremeModemSettings(uavobject.UAVObject):
|
||||||
## Object constants
|
## Object constants
|
||||||
OBJID = 3822692478
|
OBJID = 444830632
|
||||||
NAME = "PipXtremeModemSettings"
|
NAME = "PipXtremeModemSettings"
|
||||||
METANAME = "PipXtremeModemSettingsMeta"
|
METANAME = "PipXtremeModemSettingsMeta"
|
||||||
ISSINGLEINST = 1
|
ISSINGLEINST = 1
|
||||||
|
@ -43,6 +43,12 @@ PipXtremeModemStatus::PipXtremeModemStatus(): UAVDataObject(OBJID, ISSINGLEINST,
|
|||||||
{
|
{
|
||||||
// Create fields
|
// Create fields
|
||||||
QList<UAVObjectField*> fields;
|
QList<UAVObjectField*> fields;
|
||||||
|
QStringList Firmware_Version_MajorElemNames;
|
||||||
|
Firmware_Version_MajorElemNames.append("0");
|
||||||
|
fields.append( new UAVObjectField(QString("Firmware_Version_Major"), QString(""), UAVObjectField::UINT8, Firmware_Version_MajorElemNames, QStringList()) );
|
||||||
|
QStringList Firmware_Version_MinorElemNames;
|
||||||
|
Firmware_Version_MinorElemNames.append("0");
|
||||||
|
fields.append( new UAVObjectField(QString("Firmware_Version_Minor"), QString(""), UAVObjectField::UINT8, Firmware_Version_MinorElemNames, QStringList()) );
|
||||||
QStringList Serial_NumberElemNames;
|
QStringList Serial_NumberElemNames;
|
||||||
Serial_NumberElemNames.append("0");
|
Serial_NumberElemNames.append("0");
|
||||||
fields.append( new UAVObjectField(QString("Serial_Number"), QString(""), UAVObjectField::UINT32, Serial_NumberElemNames, QStringList()) );
|
fields.append( new UAVObjectField(QString("Serial_Number"), QString(""), UAVObjectField::UINT32, Serial_NumberElemNames, QStringList()) );
|
||||||
@ -110,6 +116,8 @@ UAVObject::Metadata PipXtremeModemStatus::getDefaultMetadata()
|
|||||||
*/
|
*/
|
||||||
void PipXtremeModemStatus::setDefaultFieldValues()
|
void PipXtremeModemStatus::setDefaultFieldValues()
|
||||||
{
|
{
|
||||||
|
data.Firmware_Version_Major = 0;
|
||||||
|
data.Firmware_Version_Minor = 0;
|
||||||
data.Serial_Number = 0;
|
data.Serial_Number = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -43,6 +43,8 @@ class UAVOBJECTS_EXPORT PipXtremeModemStatus: public UAVDataObject
|
|||||||
public:
|
public:
|
||||||
// Field structure
|
// Field structure
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
quint8 Firmware_Version_Major;
|
||||||
|
quint8 Firmware_Version_Minor;
|
||||||
quint32 Serial_Number;
|
quint32 Serial_Number;
|
||||||
quint32 Up_Time;
|
quint32 Up_Time;
|
||||||
quint32 Frequency;
|
quint32 Frequency;
|
||||||
@ -56,6 +58,8 @@ public:
|
|||||||
} __attribute__((packed)) DataFields;
|
} __attribute__((packed)) DataFields;
|
||||||
|
|
||||||
// Field information
|
// Field information
|
||||||
|
// Field Firmware_Version_Major information
|
||||||
|
// Field Firmware_Version_Minor information
|
||||||
// Field Serial_Number information
|
// Field Serial_Number information
|
||||||
// Field Up_Time information
|
// Field Up_Time information
|
||||||
// Field Frequency information
|
// Field Frequency information
|
||||||
@ -70,7 +74,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
static const quint32 OBJID = 539085060U;
|
static const quint32 OBJID = 2490854928U;
|
||||||
static const QString NAME;
|
static const QString NAME;
|
||||||
static const QString DESCRIPTION;
|
static const QString DESCRIPTION;
|
||||||
static const bool ISSINGLEINST = 1;
|
static const bool ISSINGLEINST = 1;
|
||||||
|
@ -37,6 +37,26 @@ from collections import namedtuple
|
|||||||
|
|
||||||
# This is a list of instances of the data fields contained in this object
|
# This is a list of instances of the data fields contained in this object
|
||||||
_fields = [ \
|
_fields = [ \
|
||||||
|
uavobject.UAVObjectField(
|
||||||
|
'Firmware_Version_Major',
|
||||||
|
'B',
|
||||||
|
1,
|
||||||
|
[
|
||||||
|
'0',
|
||||||
|
],
|
||||||
|
{
|
||||||
|
}
|
||||||
|
),
|
||||||
|
uavobject.UAVObjectField(
|
||||||
|
'Firmware_Version_Minor',
|
||||||
|
'B',
|
||||||
|
1,
|
||||||
|
[
|
||||||
|
'0',
|
||||||
|
],
|
||||||
|
{
|
||||||
|
}
|
||||||
|
),
|
||||||
uavobject.UAVObjectField(
|
uavobject.UAVObjectField(
|
||||||
'Serial_Number',
|
'Serial_Number',
|
||||||
'I',
|
'I',
|
||||||
@ -136,7 +156,7 @@ _fields = [ \
|
|||||||
|
|
||||||
class PipXtremeModemStatus(uavobject.UAVObject):
|
class PipXtremeModemStatus(uavobject.UAVObject):
|
||||||
## Object constants
|
## Object constants
|
||||||
OBJID = 539085060
|
OBJID = 2490854928
|
||||||
NAME = "PipXtremeModemStatus"
|
NAME = "PipXtremeModemStatus"
|
||||||
METANAME = "PipXtremeModemStatusMeta"
|
METANAME = "PipXtremeModemStatusMeta"
|
||||||
ISSINGLEINST = 1
|
ISSINGLEINST = 1
|
||||||
|
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
<field name="Max_Tx_Power" units="dBm" type="enum" elements="1" options="1,2,5,8,11,14,17,20" defaultvalue="11"/>
|
<field name="Max_Tx_Power" units="dBm" type="enum" elements="1" options="1,2,5,8,11,14,17,20" defaultvalue="11"/>
|
||||||
|
|
||||||
|
<field name="Tx_Data_Wait" units="ms" type="uint8" elements="1" defaultvalue="10"/>
|
||||||
|
|
||||||
<field name="AES_Encryption" units="" type="enum" elements="1" options="False,True" defaultvalue="False"/>
|
<field name="AES_Encryption" units="" type="enum" elements="1" options="False,True" defaultvalue="False"/>
|
||||||
<field name="AES_EncryptionKey" units="" type="uint8" elements="16" defaultvalue="None"/>
|
<field name="AES_EncryptionKey" units="" type="uint8" elements="16" defaultvalue="None"/>
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
<xml>
|
<xml>
|
||||||
<object name="PipXtremeModemStatus" singleinstance="true" settings="false">
|
<object name="PipXtremeModemStatus" singleinstance="true" settings="false">
|
||||||
<description>Status for the @ref PipXtremeModem</description>
|
<description>Status for the @ref PipXtremeModem</description>
|
||||||
|
<field name="Firmware_Version_Major" units="" type="uint8" elements="1" defaultvalue="0"/>
|
||||||
|
<field name="Firmware_Version_Minor" units="" type="uint8" elements="1" defaultvalue="0"/>
|
||||||
|
|
||||||
<field name="Serial_Number" units="" type="uint32" elements="1" defaultvalue="None"/>
|
<field name="Serial_Number" units="" type="uint32" elements="1" defaultvalue="None"/>
|
||||||
|
|
||||||
<field name="Up_Time" units="ms" type="uint32" elements="1"/>
|
<field name="Up_Time" units="ms" type="uint32" elements="1"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user