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

PipX modem settings update .. note that they do not yet function.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2248 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
pip 2010-12-18 13:54:35 +00:00 committed by pip
parent 3e10e3a142
commit e84b222272
12 changed files with 137 additions and 174 deletions

View File

@ -41,7 +41,7 @@
#define PIPXTREMEMODEMSETTINGS_H
// Object constants
#define PIPXTREMEMODEMSETTINGS_OBJID 2660664364U
#define PIPXTREMEMODEMSETTINGS_OBJID 3822692478U
#define PIPXTREMEMODEMSETTINGS_NAME "PipXtremeModemSettings"
#define PIPXTREMEMODEMSETTINGS_METANAME "PipXtremeModemSettingsMeta"
#define PIPXTREMEMODEMSETTINGS_ISSINGLEINST 1
@ -71,26 +71,34 @@
// Object data
typedef struct {
uint8_t Mode;
uint8_t Serial_Baudrate;
uint8_t Frequency_Calibration;
uint32_t Frequency_Min;
uint32_t Frequency_Max;
uint32_t Frequency;
uint8_t RF_Bandwidth;
uint8_t Max_RF_Bandwidth;
uint8_t Max_Tx_Power;
uint8_t AES_Encryption;
uint8_t AES_EncryptionKey[16];
uint32_t Paired_Serial_Number_CRC;
uint32_t Paired_Serial_Number;
} __attribute__((packed)) PipXtremeModemSettingsData;
// Field information
// Field Mode information
/* Enumeration options for field Mode */
typedef enum { PIPXTREMEMODEMSETTINGS_MODE_NORMAL=0, PIPXTREMEMODEMSETTINGS_MODE_TEST_CARRIER=1, PIPXTREMEMODEMSETTINGS_MODE_TEST_SPECTRUM=2 } PipXtremeModemSettingsModeOptions;
// Field Serial_Baudrate information
/* Enumeration options for field Serial_Baudrate */
typedef enum { PIPXTREMEMODEMSETTINGS_SERIAL_BAUDRATE_1200=0, PIPXTREMEMODEMSETTINGS_SERIAL_BAUDRATE_2400=1, PIPXTREMEMODEMSETTINGS_SERIAL_BAUDRATE_4800=2, PIPXTREMEMODEMSETTINGS_SERIAL_BAUDRATE_9600=3, PIPXTREMEMODEMSETTINGS_SERIAL_BAUDRATE_19200=4, PIPXTREMEMODEMSETTINGS_SERIAL_BAUDRATE_38400=5, PIPXTREMEMODEMSETTINGS_SERIAL_BAUDRATE_57600=6, PIPXTREMEMODEMSETTINGS_SERIAL_BAUDRATE_115200=7, PIPXTREMEMODEMSETTINGS_SERIAL_BAUDRATE_230400=8 } PipXtremeModemSettingsSerial_BaudrateOptions;
// Field Frequency_Calibration information
// Field Frequency_Min information
// Field Frequency_Max information
// Field Frequency information
// Field RF_Bandwidth information
/* Enumeration options for field RF_Bandwidth */
typedef enum { PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_500=0, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_1000=1, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_2000=2, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_4000=3, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_8000=4, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_9600=5, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_16000=6, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_19200=7, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_24000=8, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_32000=9, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_64000=10, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_128000=11, PIPXTREMEMODEMSETTINGS_RF_BANDWIDTH_192000=12 } PipXtremeModemSettingsRF_BandwidthOptions;
// Field Max_RF_Bandwidth information
/* Enumeration options for field Max_RF_Bandwidth */
typedef enum { PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_500=0, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_1000=1, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_2000=2, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_4000=3, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_8000=4, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_9600=5, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_16000=6, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_19200=7, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_24000=8, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_32000=9, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_64000=10, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_128000=11, PIPXTREMEMODEMSETTINGS_MAX_RF_BANDWIDTH_192000=12 } PipXtremeModemSettingsMax_RF_BandwidthOptions;
// Field Max_Tx_Power information
/* 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;
@ -100,7 +108,7 @@ typedef enum { PIPXTREMEMODEMSETTINGS_AES_ENCRYPTION_FALSE=0, PIPXTREMEMODEMSETT
// Field AES_EncryptionKey information
/* Number of elements for field AES_EncryptionKey */
#define PIPXTREMEMODEMSETTINGS_AES_ENCRYPTIONKEY_NUMELEM 16
// Field Paired_Serial_Number_CRC information
// Field Paired_Serial_Number information
// Generic interface functions

View File

@ -41,7 +41,7 @@
#define PIPXTREMEMODEMSTATUS_H
// Object constants
#define PIPXTREMEMODEMSTATUS_OBJID 3920019084U
#define PIPXTREMEMODEMSTATUS_OBJID 539085060U
#define PIPXTREMEMODEMSTATUS_NAME "PipXtremeModemStatus"
#define PIPXTREMEMODEMSTATUS_METANAME "PipXtremeModemStatusMeta"
#define PIPXTREMEMODEMSTATUS_ISSINGLEINST 1
@ -71,8 +71,7 @@
// Object data
typedef struct {
uint8_t Serial_Number[24];
uint32_t Serial_Number_CRC;
uint32_t Serial_Number;
uint32_t Up_Time;
uint32_t Frequency;
uint32_t RF_Bandwidth;
@ -86,9 +85,6 @@ typedef struct {
// Field information
// Field Serial_Number information
/* Number of elements for field Serial_Number */
#define PIPXTREMEMODEMSTATUS_SERIAL_NUMBER_NUMELEM 24
// Field Serial_Number_CRC information
// Field Up_Time information
// Field Frequency information
// Field RF_Bandwidth information

View File

@ -80,11 +80,13 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId)
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(PipXtremeModemSettingsData));
data.Mode = 0;
data.Serial_Baudrate = 6;
data.Frequency_Calibration = 127;
data.Frequency_Min = 0;
data.Frequency_Max = 0;
data.Frequency = 0;
data.RF_Bandwidth = 11;
data.Max_RF_Bandwidth = 11;
data.Max_Tx_Power = 4;
data.AES_Encryption = 0;
data.AES_EncryptionKey[0] = 0;
@ -103,7 +105,7 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId)
data.AES_EncryptionKey[13] = 0;
data.AES_EncryptionKey[14] = 0;
data.AES_EncryptionKey[15] = 0;
data.Paired_Serial_Number_CRC = 0;
data.Paired_Serial_Number = 0;
UAVObjSetInstanceData(obj, instId, &data);

View File

@ -80,31 +80,7 @@ static void setDefaults(UAVObjHandle obj, uint16_t instId)
// Initialize object fields to their default values
UAVObjGetInstanceData(obj, instId, &data);
memset(&data, 0, sizeof(PipXtremeModemStatusData));
data.Serial_Number[0] = 0;
data.Serial_Number[1] = 0;
data.Serial_Number[2] = 0;
data.Serial_Number[3] = 0;
data.Serial_Number[4] = 0;
data.Serial_Number[5] = 0;
data.Serial_Number[6] = 0;
data.Serial_Number[7] = 0;
data.Serial_Number[8] = 0;
data.Serial_Number[9] = 0;
data.Serial_Number[10] = 0;
data.Serial_Number[11] = 0;
data.Serial_Number[12] = 0;
data.Serial_Number[13] = 0;
data.Serial_Number[14] = 0;
data.Serial_Number[15] = 0;
data.Serial_Number[16] = 0;
data.Serial_Number[17] = 0;
data.Serial_Number[18] = 0;
data.Serial_Number[19] = 0;
data.Serial_Number[20] = 0;
data.Serial_Number[21] = 0;
data.Serial_Number[22] = 0;
data.Serial_Number[23] = 0;
data.Serial_Number_CRC = 0;
data.Serial_Number = 0;
UAVObjSetInstanceData(obj, instId, &data);

View File

@ -42,6 +42,26 @@ PipXtremeModemSettings::PipXtremeModemSettings(): UAVDataObject(OBJID, ISSINGLEI
{
// Create fields
QList<UAVObjectField*> fields;
QStringList ModeElemNames;
ModeElemNames.append("0");
QStringList ModeEnumOptions;
ModeEnumOptions.append("Normal");
ModeEnumOptions.append("Test_Carrier");
ModeEnumOptions.append("Test_Spectrum");
fields.append( new UAVObjectField(QString("Mode"), QString(""), UAVObjectField::ENUM, ModeElemNames, ModeEnumOptions) );
QStringList Serial_BaudrateElemNames;
Serial_BaudrateElemNames.append("0");
QStringList Serial_BaudrateEnumOptions;
Serial_BaudrateEnumOptions.append("1200");
Serial_BaudrateEnumOptions.append("2400");
Serial_BaudrateEnumOptions.append("4800");
Serial_BaudrateEnumOptions.append("9600");
Serial_BaudrateEnumOptions.append("19200");
Serial_BaudrateEnumOptions.append("38400");
Serial_BaudrateEnumOptions.append("57600");
Serial_BaudrateEnumOptions.append("115200");
Serial_BaudrateEnumOptions.append("230400");
fields.append( new UAVObjectField(QString("Serial_Baudrate"), QString("bits/sec"), UAVObjectField::ENUM, Serial_BaudrateElemNames, Serial_BaudrateEnumOptions) );
QStringList Frequency_CalibrationElemNames;
Frequency_CalibrationElemNames.append("0");
fields.append( new UAVObjectField(QString("Frequency_Calibration"), QString(""), UAVObjectField::UINT8, Frequency_CalibrationElemNames, QStringList()) );
@ -54,23 +74,23 @@ PipXtremeModemSettings::PipXtremeModemSettings(): UAVDataObject(OBJID, ISSINGLEI
QStringList FrequencyElemNames;
FrequencyElemNames.append("0");
fields.append( new UAVObjectField(QString("Frequency"), QString("Hz"), UAVObjectField::UINT32, FrequencyElemNames, QStringList()) );
QStringList RF_BandwidthElemNames;
RF_BandwidthElemNames.append("0");
QStringList RF_BandwidthEnumOptions;
RF_BandwidthEnumOptions.append("500");
RF_BandwidthEnumOptions.append("1000");
RF_BandwidthEnumOptions.append("2000");
RF_BandwidthEnumOptions.append("4000");
RF_BandwidthEnumOptions.append("8000");
RF_BandwidthEnumOptions.append("9600");
RF_BandwidthEnumOptions.append("16000");
RF_BandwidthEnumOptions.append("19200");
RF_BandwidthEnumOptions.append("24000");
RF_BandwidthEnumOptions.append("32000");
RF_BandwidthEnumOptions.append("64000");
RF_BandwidthEnumOptions.append("128000");
RF_BandwidthEnumOptions.append("192000");
fields.append( new UAVObjectField(QString("RF_Bandwidth"), QString("Hz"), UAVObjectField::ENUM, RF_BandwidthElemNames, RF_BandwidthEnumOptions) );
QStringList Max_RF_BandwidthElemNames;
Max_RF_BandwidthElemNames.append("0");
QStringList Max_RF_BandwidthEnumOptions;
Max_RF_BandwidthEnumOptions.append("500");
Max_RF_BandwidthEnumOptions.append("1000");
Max_RF_BandwidthEnumOptions.append("2000");
Max_RF_BandwidthEnumOptions.append("4000");
Max_RF_BandwidthEnumOptions.append("8000");
Max_RF_BandwidthEnumOptions.append("9600");
Max_RF_BandwidthEnumOptions.append("16000");
Max_RF_BandwidthEnumOptions.append("19200");
Max_RF_BandwidthEnumOptions.append("24000");
Max_RF_BandwidthEnumOptions.append("32000");
Max_RF_BandwidthEnumOptions.append("64000");
Max_RF_BandwidthEnumOptions.append("128000");
Max_RF_BandwidthEnumOptions.append("192000");
fields.append( new UAVObjectField(QString("Max_RF_Bandwidth"), QString("bits/sec"), UAVObjectField::ENUM, Max_RF_BandwidthElemNames, Max_RF_BandwidthEnumOptions) );
QStringList Max_Tx_PowerElemNames;
Max_Tx_PowerElemNames.append("0");
QStringList Max_Tx_PowerEnumOptions;
@ -107,9 +127,9 @@ PipXtremeModemSettings::PipXtremeModemSettings(): UAVDataObject(OBJID, ISSINGLEI
AES_EncryptionKeyElemNames.append("14");
AES_EncryptionKeyElemNames.append("15");
fields.append( new UAVObjectField(QString("AES_EncryptionKey"), QString(""), UAVObjectField::UINT8, AES_EncryptionKeyElemNames, QStringList()) );
QStringList Paired_Serial_Number_CRCElemNames;
Paired_Serial_Number_CRCElemNames.append("0");
fields.append( new UAVObjectField(QString("Paired_Serial_Number_CRC"), QString(""), UAVObjectField::UINT32, Paired_Serial_Number_CRCElemNames, QStringList()) );
QStringList Paired_Serial_NumberElemNames;
Paired_Serial_NumberElemNames.append("0");
fields.append( new UAVObjectField(QString("Paired_Serial_Number"), QString(""), UAVObjectField::UINT32, Paired_Serial_NumberElemNames, QStringList()) );
// Initialize object
initializeFields(fields, (quint8*)&data, NUMBYTES);
@ -143,11 +163,13 @@ UAVObject::Metadata PipXtremeModemSettings::getDefaultMetadata()
*/
void PipXtremeModemSettings::setDefaultFieldValues()
{
data.Mode = 0;
data.Serial_Baudrate = 6;
data.Frequency_Calibration = 127;
data.Frequency_Min = 0;
data.Frequency_Max = 0;
data.Frequency = 0;
data.RF_Bandwidth = 11;
data.Max_RF_Bandwidth = 11;
data.Max_Tx_Power = 4;
data.AES_Encryption = 0;
data.AES_EncryptionKey[0] = 0;
@ -166,7 +188,7 @@ void PipXtremeModemSettings::setDefaultFieldValues()
data.AES_EncryptionKey[13] = 0;
data.AES_EncryptionKey[14] = 0;
data.AES_EncryptionKey[15] = 0;
data.Paired_Serial_Number_CRC = 0;
data.Paired_Serial_Number = 0;
}

View File

@ -43,26 +43,34 @@ class UAVOBJECTS_EXPORT PipXtremeModemSettings: public UAVDataObject
public:
// Field structure
typedef struct {
quint8 Mode;
quint8 Serial_Baudrate;
quint8 Frequency_Calibration;
quint32 Frequency_Min;
quint32 Frequency_Max;
quint32 Frequency;
quint8 RF_Bandwidth;
quint8 Max_RF_Bandwidth;
quint8 Max_Tx_Power;
quint8 AES_Encryption;
quint8 AES_EncryptionKey[16];
quint32 Paired_Serial_Number_CRC;
quint32 Paired_Serial_Number;
} __attribute__((packed)) DataFields;
// Field information
// Field Mode information
/* Enumeration options for field Mode */
typedef enum { MODE_NORMAL=0, MODE_TEST_CARRIER=1, MODE_TEST_SPECTRUM=2 } ModeOptions;
// Field Serial_Baudrate information
/* Enumeration options for field Serial_Baudrate */
typedef enum { SERIAL_BAUDRATE_1200=0, SERIAL_BAUDRATE_2400=1, SERIAL_BAUDRATE_4800=2, SERIAL_BAUDRATE_9600=3, SERIAL_BAUDRATE_19200=4, SERIAL_BAUDRATE_38400=5, SERIAL_BAUDRATE_57600=6, SERIAL_BAUDRATE_115200=7, SERIAL_BAUDRATE_230400=8 } Serial_BaudrateOptions;
// Field Frequency_Calibration information
// Field Frequency_Min information
// Field Frequency_Max information
// Field Frequency information
// Field RF_Bandwidth information
/* Enumeration options for field RF_Bandwidth */
typedef enum { RF_BANDWIDTH_500=0, RF_BANDWIDTH_1000=1, RF_BANDWIDTH_2000=2, RF_BANDWIDTH_4000=3, RF_BANDWIDTH_8000=4, RF_BANDWIDTH_9600=5, RF_BANDWIDTH_16000=6, RF_BANDWIDTH_19200=7, RF_BANDWIDTH_24000=8, RF_BANDWIDTH_32000=9, RF_BANDWIDTH_64000=10, RF_BANDWIDTH_128000=11, RF_BANDWIDTH_192000=12 } RF_BandwidthOptions;
// Field Max_RF_Bandwidth information
/* Enumeration options for field Max_RF_Bandwidth */
typedef enum { MAX_RF_BANDWIDTH_500=0, MAX_RF_BANDWIDTH_1000=1, MAX_RF_BANDWIDTH_2000=2, MAX_RF_BANDWIDTH_4000=3, MAX_RF_BANDWIDTH_8000=4, MAX_RF_BANDWIDTH_9600=5, MAX_RF_BANDWIDTH_16000=6, MAX_RF_BANDWIDTH_19200=7, MAX_RF_BANDWIDTH_24000=8, MAX_RF_BANDWIDTH_32000=9, MAX_RF_BANDWIDTH_64000=10, MAX_RF_BANDWIDTH_128000=11, MAX_RF_BANDWIDTH_192000=12 } Max_RF_BandwidthOptions;
// Field Max_Tx_Power information
/* 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;
@ -72,11 +80,11 @@ public:
// Field AES_EncryptionKey information
/* Number of elements for field AES_EncryptionKey */
static const quint32 AES_ENCRYPTIONKEY_NUMELEM = 16;
// Field Paired_Serial_Number_CRC information
// Field Paired_Serial_Number information
// Constants
static const quint32 OBJID = 2660664364U;
static const quint32 OBJID = 3822692478U;
static const QString NAME;
static const bool ISSINGLEINST = 1;
static const bool ISSETTINGS = 1;

View File

@ -37,6 +37,38 @@ from collections import namedtuple
# This is a list of instances of the data fields contained in this object
_fields = [ \
uavobject.UAVObjectField(
'Mode',
'b',
1,
[
'0',
],
{
'0' : 'Normal',
'1' : 'Test_Carrier',
'2' : 'Test_Spectrum',
}
),
uavobject.UAVObjectField(
'Serial_Baudrate',
'b',
1,
[
'0',
],
{
'0' : '1200',
'1' : '2400',
'2' : '4800',
'3' : '9600',
'4' : '19200',
'5' : '38400',
'6' : '57600',
'7' : '115200',
'8' : '230400',
}
),
uavobject.UAVObjectField(
'Frequency_Calibration',
'B',
@ -78,7 +110,7 @@ _fields = [ \
}
),
uavobject.UAVObjectField(
'RF_Bandwidth',
'Max_RF_Bandwidth',
'b',
1,
[
@ -156,7 +188,7 @@ _fields = [ \
}
),
uavobject.UAVObjectField(
'Paired_Serial_Number_CRC',
'Paired_Serial_Number',
'I',
1,
[
@ -170,7 +202,7 @@ _fields = [ \
class PipXtremeModemSettings(uavobject.UAVObject):
## Object constants
OBJID = 2660664364
OBJID = 3822692478
NAME = "PipXtremeModemSettings"
METANAME = "PipXtremeModemSettingsMeta"
ISSINGLEINST = 1

View File

@ -44,33 +44,7 @@ PipXtremeModemStatus::PipXtremeModemStatus(): UAVDataObject(OBJID, ISSINGLEINST,
QList<UAVObjectField*> fields;
QStringList Serial_NumberElemNames;
Serial_NumberElemNames.append("0");
Serial_NumberElemNames.append("1");
Serial_NumberElemNames.append("2");
Serial_NumberElemNames.append("3");
Serial_NumberElemNames.append("4");
Serial_NumberElemNames.append("5");
Serial_NumberElemNames.append("6");
Serial_NumberElemNames.append("7");
Serial_NumberElemNames.append("8");
Serial_NumberElemNames.append("9");
Serial_NumberElemNames.append("10");
Serial_NumberElemNames.append("11");
Serial_NumberElemNames.append("12");
Serial_NumberElemNames.append("13");
Serial_NumberElemNames.append("14");
Serial_NumberElemNames.append("15");
Serial_NumberElemNames.append("16");
Serial_NumberElemNames.append("17");
Serial_NumberElemNames.append("18");
Serial_NumberElemNames.append("19");
Serial_NumberElemNames.append("20");
Serial_NumberElemNames.append("21");
Serial_NumberElemNames.append("22");
Serial_NumberElemNames.append("23");
fields.append( new UAVObjectField(QString("Serial_Number"), QString(""), UAVObjectField::UINT8, Serial_NumberElemNames, QStringList()) );
QStringList Serial_Number_CRCElemNames;
Serial_Number_CRCElemNames.append("0");
fields.append( new UAVObjectField(QString("Serial_Number_CRC"), QString(""), UAVObjectField::UINT32, Serial_Number_CRCElemNames, QStringList()) );
fields.append( new UAVObjectField(QString("Serial_Number"), QString(""), UAVObjectField::UINT32, Serial_NumberElemNames, QStringList()) );
QStringList Up_TimeElemNames;
Up_TimeElemNames.append("0");
fields.append( new UAVObjectField(QString("Up_Time"), QString("ms"), UAVObjectField::UINT32, Up_TimeElemNames, QStringList()) );
@ -79,7 +53,7 @@ PipXtremeModemStatus::PipXtremeModemStatus(): UAVDataObject(OBJID, ISSINGLEINST,
fields.append( new UAVObjectField(QString("Frequency"), QString("Hz"), UAVObjectField::UINT32, FrequencyElemNames, QStringList()) );
QStringList RF_BandwidthElemNames;
RF_BandwidthElemNames.append("0");
fields.append( new UAVObjectField(QString("RF_Bandwidth"), QString("Hz"), UAVObjectField::UINT32, RF_BandwidthElemNames, QStringList()) );
fields.append( new UAVObjectField(QString("RF_Bandwidth"), QString("bits/sec"), UAVObjectField::UINT32, RF_BandwidthElemNames, QStringList()) );
QStringList Tx_PowerElemNames;
Tx_PowerElemNames.append("0");
fields.append( new UAVObjectField(QString("Tx_Power"), QString("dBm"), UAVObjectField::INT8, Tx_PowerElemNames, QStringList()) );
@ -96,10 +70,10 @@ PipXtremeModemStatus::PipXtremeModemStatus(): UAVDataObject(OBJID, ISSINGLEINST,
fields.append( new UAVObjectField(QString("Tx_Retry"), QString(""), UAVObjectField::UINT16, Tx_RetryElemNames, QStringList()) );
QStringList Tx_Data_RateElemNames;
Tx_Data_RateElemNames.append("0");
fields.append( new UAVObjectField(QString("Tx_Data_Rate"), QString("bytes/sec"), UAVObjectField::UINT32, Tx_Data_RateElemNames, QStringList()) );
fields.append( new UAVObjectField(QString("Tx_Data_Rate"), QString("bits/sec"), UAVObjectField::UINT32, Tx_Data_RateElemNames, QStringList()) );
QStringList Rx_Data_RateElemNames;
Rx_Data_RateElemNames.append("0");
fields.append( new UAVObjectField(QString("Rx_Data_Rate"), QString("bytes/sec"), UAVObjectField::UINT32, Rx_Data_RateElemNames, QStringList()) );
fields.append( new UAVObjectField(QString("Rx_Data_Rate"), QString("bits/sec"), UAVObjectField::UINT32, Rx_Data_RateElemNames, QStringList()) );
// Initialize object
initializeFields(fields, (quint8*)&data, NUMBYTES);
@ -133,31 +107,7 @@ UAVObject::Metadata PipXtremeModemStatus::getDefaultMetadata()
*/
void PipXtremeModemStatus::setDefaultFieldValues()
{
data.Serial_Number[0] = 0;
data.Serial_Number[1] = 0;
data.Serial_Number[2] = 0;
data.Serial_Number[3] = 0;
data.Serial_Number[4] = 0;
data.Serial_Number[5] = 0;
data.Serial_Number[6] = 0;
data.Serial_Number[7] = 0;
data.Serial_Number[8] = 0;
data.Serial_Number[9] = 0;
data.Serial_Number[10] = 0;
data.Serial_Number[11] = 0;
data.Serial_Number[12] = 0;
data.Serial_Number[13] = 0;
data.Serial_Number[14] = 0;
data.Serial_Number[15] = 0;
data.Serial_Number[16] = 0;
data.Serial_Number[17] = 0;
data.Serial_Number[18] = 0;
data.Serial_Number[19] = 0;
data.Serial_Number[20] = 0;
data.Serial_Number[21] = 0;
data.Serial_Number[22] = 0;
data.Serial_Number[23] = 0;
data.Serial_Number_CRC = 0;
data.Serial_Number = 0;
}

View File

@ -43,8 +43,7 @@ class UAVOBJECTS_EXPORT PipXtremeModemStatus: public UAVDataObject
public:
// Field structure
typedef struct {
quint8 Serial_Number[24];
quint32 Serial_Number_CRC;
quint32 Serial_Number;
quint32 Up_Time;
quint32 Frequency;
quint32 RF_Bandwidth;
@ -58,9 +57,6 @@ public:
// Field information
// Field Serial_Number information
/* Number of elements for field Serial_Number */
static const quint32 SERIAL_NUMBER_NUMELEM = 24;
// Field Serial_Number_CRC information
// Field Up_Time information
// Field Frequency information
// Field RF_Bandwidth information
@ -74,7 +70,7 @@ public:
// Constants
static const quint32 OBJID = 3920019084U;
static const quint32 OBJID = 539085060U;
static const QString NAME;
static const bool ISSINGLEINST = 1;
static const bool ISSETTINGS = 0;

View File

@ -39,39 +39,6 @@ from collections import namedtuple
_fields = [ \
uavobject.UAVObjectField(
'Serial_Number',
'B',
24,
[
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'10',
'11',
'12',
'13',
'14',
'15',
'16',
'17',
'18',
'19',
'20',
'21',
'22',
'23',
],
{
}
),
uavobject.UAVObjectField(
'Serial_Number_CRC',
'I',
1,
[
@ -169,7 +136,7 @@ _fields = [ \
class PipXtremeModemStatus(uavobject.UAVObject):
## Object constants
OBJID = 3920019084
OBJID = 539085060
NAME = "PipXtremeModemStatus"
METANAME = "PipXtremeModemStatusMeta"
ISSINGLEINST = 1

View File

@ -2,19 +2,24 @@
<object name="PipXtremeModemSettings" singleinstance="true" settings="true">
<description>Settings for the @ref PipXtremeModemSettings</description>
<field name="Mode" units="" type="enum" elements="1" options="Normal,Test_Carrier,Test_Spectrum" defaultvalue="Normal"/>
<field name="Serial_Baudrate" units="bits/sec" type="enum" elements="1" options="1200,2400,4800,9600,19200,38400,57600,115200,230400" defaultvalue="57600"/>
<field name="Frequency_Calibration" units="" type="uint8" elements="1" defaultvalue="127"/>
<field name="Frequency_Min" units="Hz" type="uint32" elements="1" defaultvalue="0"/>
<field name="Frequency_Max" units="Hz" type="uint32" elements="1" defaultvalue="0"/>
<field name="Frequency" units="Hz" type="uint32" elements="1" defaultvalue="0"/>
<field name="RF_Bandwidth" units="Hz" type="enum" elements="1" options="500,1000,2000,4000,8000,9600,16000,19200,24000,32000,64000,128000,192000" defaultvalue="128000"/>
<field name="Max_RF_Bandwidth" units="bits/sec" type="enum" elements="1" options="500,1000,2000,4000,8000,9600,16000,19200,24000,32000,64000,128000,192000" defaultvalue="128000"/>
<field name="Max_Tx_Power" units="dBm" type="enum" elements="1" options="1,2,5,8,11,14,17,20" defaultvalue="11"/>
<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="Paired_Serial_Number_CRC" units="" type="uint32" elements="1" defaultvalue="0"/>
<field name="Paired_Serial_Number" units="" type="uint32" elements="1" defaultvalue="0"/>
<access gcs="readwrite" flight="readwrite"/>
<telemetrygcs acked="true" updatemode="onchange" period="0"/>

View File

@ -1,21 +1,22 @@
<xml>
<object name="PipXtremeModemStatus" singleinstance="true" settings="false">
<description>Status for the @ref PipXtremeModem</description>
<field name="Serial_Number" units="" type="uint8" elements="24" defaultvalue="None"/>
<field name="Serial_Number_CRC" 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="Frequency" units="Hz" type="uint32" elements="1"/>
<field name="RF_Bandwidth" units="Hz" type="uint32" elements="1"/>
<field name="RF_Bandwidth" units="bits/sec" type="uint32" elements="1"/>
<field name="Tx_Power" units="dBm" type="int8" elements="1"/>
<field name="State" units="" type="enum" elements="1" options="Disconnected,Connecting,Connected,NotReady"/>
<field name="Tx_Retry" units="" type="uint16" elements="1"/>
<field name="Tx_Data_Rate" units="bytes/sec" type="uint32" elements="1"/>
<field name="Rx_Data_Rate" units="bytes/sec" type="uint32" elements="1"/>
<field name="Tx_Data_Rate" units="bits/sec" type="uint32" elements="1"/>
<field name="Rx_Data_Rate" units="bits/sec" type="uint32" elements="1"/>
<access gcs="readwrite" flight="readwrite"/>
<telemetrygcs acked="false" updatemode="manual" period="0"/>