mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-05 21:52:10 +01:00
Merge branch 'MikeL_MixerCurve' of ssh://git.openpilot.org/OpenPilot into pt/CC3D_Release
Conflicts: ground/openpilotgcs/src/plugins/config/pipxtreme.ui
This commit is contained in:
commit
c8fdfb5dab
3
.gitignore
vendored
3
.gitignore
vendored
@ -20,6 +20,9 @@
|
|||||||
/flight/OpenPilot/Build
|
/flight/OpenPilot/Build
|
||||||
/flight/OpenPilot/Build.win32
|
/flight/OpenPilot/Build.win32
|
||||||
|
|
||||||
|
#flight/Project/OpenPilotOSX
|
||||||
|
flight/Project/OpenPilotOSX/build
|
||||||
|
|
||||||
# /flight/PipBee/
|
# /flight/PipBee/
|
||||||
/flight/PipBee/Build
|
/flight/PipBee/Build
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ void PHRegisterStatusHandler(PHInstHandle h, PHStatusHandler f);
|
|||||||
void PHRegisterPPMHandler(PHInstHandle h, PHPPMHandler f);
|
void PHRegisterPPMHandler(PHInstHandle h, PHPPMHandler f);
|
||||||
uint32_t PHConnect(PHInstHandle h, uint32_t dest_id);
|
uint32_t PHConnect(PHInstHandle h, uint32_t dest_id);
|
||||||
PHPacketHandle PHGetRXPacket(PHInstHandle h);
|
PHPacketHandle PHGetRXPacket(PHInstHandle h);
|
||||||
void PHReleaseTXPacket(PHInstHandle h, PHPacketHandle p);
|
void PHReleaseRXPacket(PHInstHandle h, PHPacketHandle p);
|
||||||
PHPacketHandle PHGetTXPacket(PHInstHandle h);
|
PHPacketHandle PHGetTXPacket(PHInstHandle h);
|
||||||
void PHReleaseTXPacket(PHInstHandle h, PHPacketHandle p);
|
void PHReleaseTXPacket(PHInstHandle h, PHPacketHandle p);
|
||||||
uint8_t PHTransmitPacket(PHInstHandle h, PHPacketHandle p);
|
uint8_t PHTransmitPacket(PHInstHandle h, PHPacketHandle p);
|
||||||
|
@ -169,16 +169,15 @@ PHPacketHandle PHGetTXPacket(PHInstHandle h)
|
|||||||
|
|
||||||
// Lock
|
// Lock
|
||||||
xSemaphoreTakeRecursive(data->lock, portMAX_DELAY);
|
xSemaphoreTakeRecursive(data->lock, portMAX_DELAY);
|
||||||
PHPacketHandle p = data->tx_packets + data->tx_win_end;
|
|
||||||
|
|
||||||
// Is the window full?
|
// Find a free packet.
|
||||||
uint8_t next_end = (data->tx_win_end + 1) % data->cfg.winSize;
|
PHPacketHandle p = NULL;
|
||||||
if(next_end == data->tx_win_start)
|
for (uint8_t i = 0; i < data->cfg.winSize; ++i)
|
||||||
|
if (data->tx_packets[i].header.type == PACKET_TYPE_NONE)
|
||||||
{
|
{
|
||||||
xSemaphoreGiveRecursive(data->lock);
|
p = data->tx_packets + i;
|
||||||
return NULL;
|
break;
|
||||||
}
|
}
|
||||||
data->tx_win_end = next_end;
|
|
||||||
|
|
||||||
// Release lock
|
// Release lock
|
||||||
xSemaphoreGiveRecursive(data->lock);
|
xSemaphoreGiveRecursive(data->lock);
|
||||||
@ -224,17 +223,15 @@ PHPacketHandle PHGetRXPacket(PHInstHandle h)
|
|||||||
|
|
||||||
// Lock
|
// Lock
|
||||||
xSemaphoreTakeRecursive(data->lock, portMAX_DELAY);
|
xSemaphoreTakeRecursive(data->lock, portMAX_DELAY);
|
||||||
PHPacketHandle p = data->rx_packets + data->rx_win_end;
|
|
||||||
|
|
||||||
// Is the window full?
|
// Find a free packet.
|
||||||
uint8_t next_end = (data->rx_win_end + 1) % data->cfg.winSize;
|
PHPacketHandle p = NULL;
|
||||||
if(next_end == data->rx_win_start)
|
for (uint8_t i = 0; i < data->cfg.winSize; ++i)
|
||||||
|
if (data->rx_packets[i].header.type == PACKET_TYPE_NONE)
|
||||||
{
|
{
|
||||||
// Release lock
|
p = data->rx_packets + i;
|
||||||
xSemaphoreGiveRecursive(data->lock);
|
break;
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
data->rx_win_end = next_end;
|
|
||||||
|
|
||||||
// Release lock
|
// Release lock
|
||||||
xSemaphoreGiveRecursive(data->lock);
|
xSemaphoreGiveRecursive(data->lock);
|
||||||
|
@ -61,8 +61,9 @@
|
|||||||
#define PACKET_QUEUE_SIZE 10
|
#define PACKET_QUEUE_SIZE 10
|
||||||
#define MAX_PORT_DELAY 200
|
#define MAX_PORT_DELAY 200
|
||||||
#define EV_PACKET_RECEIVED 0x20
|
#define EV_PACKET_RECEIVED 0x20
|
||||||
|
#define EV_TRANSMIT_PACKET 0x30
|
||||||
#define EV_SEND_ACK 0x40
|
#define EV_SEND_ACK 0x40
|
||||||
#define EV_SEND_NACK 0x80
|
#define EV_SEND_NACK 0x50
|
||||||
|
|
||||||
// ****************
|
// ****************
|
||||||
// Private types
|
// Private types
|
||||||
@ -79,22 +80,36 @@ typedef struct {
|
|||||||
} PairStats;
|
} PairStats;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
uint32_t comPort;
|
||||||
|
UAVTalkConnection UAVTalkCon;
|
||||||
|
xQueueHandle sendQueue;
|
||||||
|
xQueueHandle recvQueue;
|
||||||
|
xQueueHandle gcsQueue;
|
||||||
|
uint16_t wdg;
|
||||||
|
bool checkHID;
|
||||||
|
} UAVTalkComTaskParams;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
|
||||||
// The task handles.
|
// The task handles.
|
||||||
xTaskHandle comUAVTalkTaskHandle;
|
xTaskHandle GCSUAVTalkRecvTaskHandle;
|
||||||
|
xTaskHandle UAVTalkRecvTaskHandle;
|
||||||
xTaskHandle radioReceiveTaskHandle;
|
xTaskHandle radioReceiveTaskHandle;
|
||||||
xTaskHandle sendPacketTaskHandle;
|
xTaskHandle sendPacketTaskHandle;
|
||||||
xTaskHandle sendDataTaskHandle;
|
xTaskHandle UAVTalkSendTaskHandle;
|
||||||
xTaskHandle radioStatusTaskHandle;
|
xTaskHandle radioStatusTaskHandle;
|
||||||
xTaskHandle transparentCommTaskHandle;
|
xTaskHandle transparentCommTaskHandle;
|
||||||
xTaskHandle ppmInputTaskHandle;
|
xTaskHandle ppmInputTaskHandle;
|
||||||
|
|
||||||
// The UAVTalk connection on the com side.
|
// The UAVTalk connection on the com side.
|
||||||
UAVTalkConnection inUAVTalkCon;
|
UAVTalkConnection UAVTalkCon;
|
||||||
UAVTalkConnection outUAVTalkCon;
|
UAVTalkConnection GCSUAVTalkCon;
|
||||||
|
|
||||||
// Queue handles.
|
// Queue handles.
|
||||||
xQueueHandle sendPacketQueue;
|
xQueueHandle radioPacketQueue;
|
||||||
xQueueHandle objEventQueue;
|
xQueueHandle gcsEventQueue;
|
||||||
|
xQueueHandle uavtalkEventQueue;
|
||||||
|
xQueueHandle ppmOutQueue;
|
||||||
|
|
||||||
// Error statistics.
|
// Error statistics.
|
||||||
uint32_t comTxErrors;
|
uint32_t comTxErrors;
|
||||||
@ -122,6 +137,10 @@ typedef struct {
|
|||||||
// The RSSI of the last packet received.
|
// The RSSI of the last packet received.
|
||||||
int8_t RSSI;
|
int8_t RSSI;
|
||||||
|
|
||||||
|
// Thread parameters.
|
||||||
|
UAVTalkComTaskParams uavtalk_params;
|
||||||
|
UAVTalkComTaskParams gcs_uavtalk_params;
|
||||||
|
|
||||||
} RadioComBridgeData;
|
} RadioComBridgeData;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -135,21 +154,24 @@ typedef struct {
|
|||||||
// ****************
|
// ****************
|
||||||
// Private functions
|
// Private functions
|
||||||
|
|
||||||
static void comUAVTalkTask(void *parameters);
|
static void UAVTalkRecvTask(void *parameters);
|
||||||
static void radioReceiveTask(void *parameters);
|
static void radioReceiveTask(void *parameters);
|
||||||
static void sendPacketTask(void *parameters);
|
static void sendPacketTask(void *parameters);
|
||||||
static void sendDataTask(void *parameters);
|
static void UAVTalkSendTask(void *parameters);
|
||||||
static void transparentCommTask(void * parameters);
|
static void transparentCommTask(void * parameters);
|
||||||
static void radioStatusTask(void *parameters);
|
static void radioStatusTask(void *parameters);
|
||||||
static void ppmInputTask(void *parameters);
|
static void ppmInputTask(void *parameters);
|
||||||
static int32_t transmitData(uint8_t * data, int32_t length);
|
static int32_t UAVTalkSendHandler(uint8_t * data, int32_t length);
|
||||||
|
static int32_t GCSUAVTalkSendHandler(uint8_t * data, int32_t length);
|
||||||
static int32_t transmitPacket(PHPacketHandle packet);
|
static int32_t transmitPacket(PHPacketHandle packet);
|
||||||
static void receiveData(uint8_t *buf, uint8_t len, int8_t rssi, int8_t afc);
|
static void receiveData(uint8_t *buf, uint8_t len, int8_t rssi, int8_t afc);
|
||||||
|
static void transmitData(uint32_t outputPort, uint8_t *buf, uint8_t len, bool checkHid);
|
||||||
static void StatusHandler(PHStatusPacketHandle p, int8_t rssi, int8_t afc);
|
static void StatusHandler(PHStatusPacketHandle p, int8_t rssi, int8_t afc);
|
||||||
static void PPMHandler(uint16_t *channels);
|
static void PPMHandler(uint16_t *channels);
|
||||||
static BufferedReadHandle BufferedReadInit(uint32_t com_port, uint16_t buffer_length);
|
static BufferedReadHandle BufferedReadInit(uint32_t com_port, uint16_t buffer_length);
|
||||||
static bool BufferedRead(BufferedReadHandle h, uint8_t *value, uint32_t timeout_ms);
|
static bool BufferedRead(BufferedReadHandle h, uint8_t *value, uint32_t timeout_ms);
|
||||||
static void BufferedReadSetCom(BufferedReadHandle h, uint32_t com_port);
|
static void BufferedReadSetCom(BufferedReadHandle h, uint32_t com_port);
|
||||||
|
static void queueEvent(xQueueHandle queue, void *obj, uint16_t instId, UAVObjEventType type);
|
||||||
static void updateSettings();
|
static void updateSettings();
|
||||||
|
|
||||||
// ****************
|
// ****************
|
||||||
@ -165,23 +187,34 @@ static RadioComBridgeData *data;
|
|||||||
static int32_t RadioComBridgeStart(void)
|
static int32_t RadioComBridgeStart(void)
|
||||||
{
|
{
|
||||||
if(data) {
|
if(data) {
|
||||||
|
// Start the primary tasks for receiving/sending UAVTalk packets from the GCS.
|
||||||
|
xTaskCreate(UAVTalkRecvTask, (signed char *)"GCSUAVTalkRecvTask", STACK_SIZE_BYTES, (void*)&(data->gcs_uavtalk_params), TASK_PRIORITY + 2, &(data->GCSUAVTalkRecvTaskHandle));
|
||||||
|
xTaskCreate(UAVTalkSendTask, (signed char *)"GCSUAVTalkSendTask", STACK_SIZE_BYTES, (void*)&(data->gcs_uavtalk_params), TASK_PRIORITY+ 2, &(data->UAVTalkSendTaskHandle));
|
||||||
|
|
||||||
|
// If a UAVTalk (non-GCS) com port is set it implies that the com port is connected on the flight side.
|
||||||
|
// In this case we want to start another com thread on the HID port to talk to the GCS when connected.
|
||||||
|
if (PIOS_COM_UAVTALK)
|
||||||
|
{
|
||||||
|
xTaskCreate(UAVTalkRecvTask, (signed char *)"UAVTalkRecvTask", STACK_SIZE_BYTES, (void*)&(data->uavtalk_params), TASK_PRIORITY + 2, &(data->UAVTalkRecvTaskHandle));
|
||||||
|
xTaskCreate(UAVTalkSendTask, (signed char *)"UAVTalkSendTask", STACK_SIZE_BYTES, (void*)&(data->uavtalk_params), TASK_PRIORITY+ 2, &(data->UAVTalkSendTaskHandle));
|
||||||
|
}
|
||||||
|
|
||||||
// Start the tasks
|
// Start the tasks
|
||||||
xTaskCreate(comUAVTalkTask, (signed char *)"ComUAVTalk", STACK_SIZE_BYTES, NULL, TASK_PRIORITY + 2, &(data->comUAVTalkTaskHandle));
|
|
||||||
if(PIOS_COM_TRANS_COM)
|
if(PIOS_COM_TRANS_COM)
|
||||||
xTaskCreate(transparentCommTask, (signed char *)"transparentComm", STACK_SIZE_BYTES, NULL, TASK_PRIORITY + 2, &(data->transparentCommTaskHandle));
|
xTaskCreate(transparentCommTask, (signed char *)"transparentComm", STACK_SIZE_BYTES, NULL, TASK_PRIORITY + 2, &(data->transparentCommTaskHandle));
|
||||||
xTaskCreate(radioReceiveTask, (signed char *)"RadioReceive", STACK_SIZE_BYTES, NULL, TASK_PRIORITY+ 2, &(data->radioReceiveTaskHandle));
|
xTaskCreate(radioReceiveTask, (signed char *)"RadioReceive", STACK_SIZE_BYTES, NULL, TASK_PRIORITY+ 2, &(data->radioReceiveTaskHandle));
|
||||||
xTaskCreate(sendPacketTask, (signed char *)"SendPacketTask", STACK_SIZE_BYTES, NULL, TASK_PRIORITY + 2, &(data->sendPacketTaskHandle));
|
xTaskCreate(sendPacketTask, (signed char *)"SendPacketTask", STACK_SIZE_BYTES, NULL, TASK_PRIORITY + 2, &(data->sendPacketTaskHandle));
|
||||||
xTaskCreate(sendDataTask, (signed char *)"SendDataTask", STACK_SIZE_BYTES, NULL, TASK_PRIORITY+ 2, &(data->sendDataTaskHandle));
|
|
||||||
xTaskCreate(radioStatusTask, (signed char *)"RadioStatus", STACK_SIZE_BYTES, NULL, TASK_PRIORITY, &(data->radioStatusTaskHandle));
|
xTaskCreate(radioStatusTask, (signed char *)"RadioStatus", STACK_SIZE_BYTES, NULL, TASK_PRIORITY, &(data->radioStatusTaskHandle));
|
||||||
if(PIOS_PPM_RECEIVER)
|
if(PIOS_PPM_RECEIVER)
|
||||||
xTaskCreate(ppmInputTask, (signed char *)"PPMInputTask", STACK_SIZE_BYTES, NULL, TASK_PRIORITY + 2, &(data->ppmInputTaskHandle));
|
xTaskCreate(ppmInputTask, (signed char *)"PPMInputTask", STACK_SIZE_BYTES, NULL, TASK_PRIORITY + 2, &(data->ppmInputTaskHandle));
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
|
PIOS_WDG_RegisterFlag(PIOS_WDG_COMGCS);
|
||||||
|
if(PIOS_COM_UAVTALK)
|
||||||
PIOS_WDG_RegisterFlag(PIOS_WDG_COMUAVTALK);
|
PIOS_WDG_RegisterFlag(PIOS_WDG_COMUAVTALK);
|
||||||
if(PIOS_COM_TRANS_COM)
|
if(PIOS_COM_TRANS_COM)
|
||||||
PIOS_WDG_RegisterFlag(PIOS_WDG_TRANSCOMM);
|
PIOS_WDG_RegisterFlag(PIOS_WDG_TRANSCOMM);
|
||||||
PIOS_WDG_RegisterFlag(PIOS_WDG_RADIORECEIVE);
|
PIOS_WDG_RegisterFlag(PIOS_WDG_RADIORECEIVE);
|
||||||
//PIOS_WDG_RegisterFlag(PIOS_WDG_SENDPACKET);
|
//PIOS_WDG_RegisterFlag(PIOS_WDG_SENDPACKET);
|
||||||
//PIOS_WDG_RegisterFlag(PIOS_WDG_SENDDATA);
|
|
||||||
if(PIOS_PPM_RECEIVER)
|
if(PIOS_PPM_RECEIVER)
|
||||||
PIOS_WDG_RegisterFlag(PIOS_WDG_PPMINPUT);
|
PIOS_WDG_RegisterFlag(PIOS_WDG_PPMINPUT);
|
||||||
#endif
|
#endif
|
||||||
@ -211,12 +244,21 @@ static int32_t RadioComBridgeInitialize(void)
|
|||||||
updateSettings();
|
updateSettings();
|
||||||
|
|
||||||
// Initialise UAVTalk
|
// Initialise UAVTalk
|
||||||
data->inUAVTalkCon = UAVTalkInitialize(0);
|
data->GCSUAVTalkCon = UAVTalkInitialize(&GCSUAVTalkSendHandler);
|
||||||
data->outUAVTalkCon = UAVTalkInitialize(&transmitData);
|
if (PIOS_COM_UAVTALK)
|
||||||
|
data->UAVTalkCon = UAVTalkInitialize(&UAVTalkSendHandler);
|
||||||
|
|
||||||
// Initialize the queues.
|
// Initialize the queues.
|
||||||
data->sendPacketQueue = xQueueCreate(PACKET_QUEUE_SIZE, sizeof(PHPacketHandle));
|
data->ppmOutQueue = 0;
|
||||||
data->objEventQueue = xQueueCreate(PACKET_QUEUE_SIZE, sizeof(UAVObjEvent));
|
data->radioPacketQueue = xQueueCreate(PACKET_QUEUE_SIZE, sizeof(UAVObjEvent));
|
||||||
|
data->gcsEventQueue = xQueueCreate(PACKET_QUEUE_SIZE, sizeof(UAVObjEvent));
|
||||||
|
if (PIOS_COM_UAVTALK)
|
||||||
|
data->uavtalkEventQueue = xQueueCreate(PACKET_QUEUE_SIZE, sizeof(UAVObjEvent));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
data->uavtalkEventQueue = 0;
|
||||||
|
data->ppmOutQueue = data->radioPacketQueue;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize the statistics.
|
// Initialize the statistics.
|
||||||
data->radioTxErrors = 0;
|
data->radioTxErrors = 0;
|
||||||
@ -232,8 +274,8 @@ static int32_t RadioComBridgeInitialize(void)
|
|||||||
// Register the callbacks with the packet handler
|
// Register the callbacks with the packet handler
|
||||||
PHRegisterOutputStream(pios_packet_handler, transmitPacket);
|
PHRegisterOutputStream(pios_packet_handler, transmitPacket);
|
||||||
PHRegisterDataHandler(pios_packet_handler, receiveData);
|
PHRegisterDataHandler(pios_packet_handler, receiveData);
|
||||||
PHRegisterStatusHandler(pios_packet_handler, StatusHandler);
|
|
||||||
PHRegisterPPMHandler(pios_packet_handler, PPMHandler);
|
PHRegisterPPMHandler(pios_packet_handler, PPMHandler);
|
||||||
|
PHRegisterStatusHandler(pios_packet_handler, StatusHandler);
|
||||||
|
|
||||||
// Initialize the packet send timeout
|
// Initialize the packet send timeout
|
||||||
data->send_timeout = 25; // ms
|
data->send_timeout = 25; // ms
|
||||||
@ -255,9 +297,28 @@ static int32_t RadioComBridgeInitialize(void)
|
|||||||
PipXSettingsPairIDGet(&(data->pairStats[0].pairID));
|
PipXSettingsPairIDGet(&(data->pairStats[0].pairID));
|
||||||
|
|
||||||
// Configure our UAVObjects for updates.
|
// Configure our UAVObjects for updates.
|
||||||
UAVObjConnectQueue(UAVObjGetByID(PIPXSTATUS_OBJID), data->objEventQueue, EV_UPDATED | EV_UPDATED_MANUAL | EV_UPDATE_REQ);
|
UAVObjConnectQueue(UAVObjGetByID(PIPXSTATUS_OBJID), data->gcsEventQueue, EV_UPDATED | EV_UPDATED_MANUAL | EV_UPDATE_REQ);
|
||||||
UAVObjConnectQueue(UAVObjGetByID(GCSRECEIVER_OBJID), data->objEventQueue, EV_UPDATED | EV_UPDATED_MANUAL | EV_UPDATE_REQ);
|
UAVObjConnectQueue(UAVObjGetByID(GCSRECEIVER_OBJID), data->uavtalkEventQueue ? data->uavtalkEventQueue : data->gcsEventQueue, EV_UPDATED | EV_UPDATED_MANUAL | EV_UPDATE_REQ);
|
||||||
UAVObjConnectQueue(UAVObjGetByID(OBJECTPERSISTENCE_OBJID), data->objEventQueue, EV_UPDATED | EV_UPDATED_MANUAL);
|
UAVObjConnectQueue(UAVObjGetByID(OBJECTPERSISTENCE_OBJID), data->gcsEventQueue, EV_UPDATED | EV_UPDATED_MANUAL);
|
||||||
|
|
||||||
|
// Initialize the UAVTalk comm parameters.
|
||||||
|
data->gcs_uavtalk_params.UAVTalkCon = data->GCSUAVTalkCon;
|
||||||
|
data->gcs_uavtalk_params.sendQueue = data->radioPacketQueue;
|
||||||
|
data->gcs_uavtalk_params.recvQueue = data->gcsEventQueue;
|
||||||
|
data->gcs_uavtalk_params.wdg = PIOS_WDG_COMGCS;
|
||||||
|
data->gcs_uavtalk_params.checkHID = true;
|
||||||
|
data->gcs_uavtalk_params.comPort = PIOS_COM_GCS;
|
||||||
|
if (PIOS_COM_UAVTALK)
|
||||||
|
{
|
||||||
|
data->gcs_uavtalk_params.sendQueue = data->uavtalkEventQueue;
|
||||||
|
data->uavtalk_params.UAVTalkCon = data->UAVTalkCon;
|
||||||
|
data->uavtalk_params.sendQueue = data->radioPacketQueue;
|
||||||
|
data->uavtalk_params.recvQueue = data->uavtalkEventQueue;
|
||||||
|
data->uavtalk_params.gcsQueue = data->gcsEventQueue;
|
||||||
|
data->uavtalk_params.wdg = PIOS_WDG_COMUAVTALK;
|
||||||
|
data->uavtalk_params.checkHID = false;
|
||||||
|
data->uavtalk_params.comPort = PIOS_COM_UAVTALK;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -266,30 +327,32 @@ MODULE_INITCALL(RadioComBridgeInitialize, RadioComBridgeStart)
|
|||||||
/**
|
/**
|
||||||
* Reads UAVTalk messages froma com port and creates packets out of them.
|
* Reads UAVTalk messages froma com port and creates packets out of them.
|
||||||
*/
|
*/
|
||||||
static void comUAVTalkTask(void *parameters)
|
static void UAVTalkRecvTask(void *parameters)
|
||||||
{
|
{
|
||||||
|
UAVTalkComTaskParams *params = (UAVTalkComTaskParams *)parameters;
|
||||||
PHPacketHandle p = NULL;
|
PHPacketHandle p = NULL;
|
||||||
|
|
||||||
// Create the buffered reader.
|
// Create the buffered reader.
|
||||||
BufferedReadHandle f = BufferedReadInit(PIOS_COM_UAVTALK, TEMP_BUFFER_SIZE);
|
BufferedReadHandle f = BufferedReadInit(params->comPort, TEMP_BUFFER_SIZE);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
// Update the watchdog timer.
|
// Update the watchdog timer.
|
||||||
PIOS_WDG_UpdateFlag(PIOS_WDG_COMUAVTALK);
|
if (params->wdg)
|
||||||
|
PIOS_WDG_UpdateFlag(params->wdg);
|
||||||
#endif /* PIOS_INCLUDE_WDG */
|
#endif /* PIOS_INCLUDE_WDG */
|
||||||
|
|
||||||
// Receive from USB HID if available, otherwise UAVTalk com if it's available.
|
// Receive from USB HID if available, otherwise UAVTalk com if it's available.
|
||||||
#if defined(PIOS_INCLUDE_USB)
|
#if defined(PIOS_INCLUDE_USB)
|
||||||
// Determine input port (USB takes priority over telemetry port)
|
// Determine input port (USB takes priority over telemetry port)
|
||||||
if (PIOS_USB_CheckAvailable(0))
|
if (params->checkHID && PIOS_USB_CheckAvailable(0))
|
||||||
BufferedReadSetCom(f, PIOS_COM_USB_HID);
|
BufferedReadSetCom(f, PIOS_COM_USB_HID);
|
||||||
else
|
else
|
||||||
#endif /* PIOS_INCLUDE_USB */
|
#endif /* PIOS_INCLUDE_USB */
|
||||||
{
|
{
|
||||||
if (PIOS_COM_UAVTALK)
|
if (params->comPort)
|
||||||
BufferedReadSetCom(f, PIOS_COM_UAVTALK);
|
BufferedReadSetCom(f, params->comPort);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vTaskDelay(5);
|
vTaskDelay(5);
|
||||||
@ -307,7 +370,7 @@ static void comUAVTalkTask(void *parameters)
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Wait until we receive a sync.
|
// Wait until we receive a sync.
|
||||||
UAVTalkRxState state = UAVTalkProcessInputStreamQuiet(data->inUAVTalkCon, rx_byte);
|
UAVTalkRxState state = UAVTalkProcessInputStreamQuiet(params->UAVTalkCon, rx_byte);
|
||||||
if (state != UAVTALK_STATE_TYPE)
|
if (state != UAVTALK_STATE_TYPE)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -324,7 +387,6 @@ static void comUAVTalkTask(void *parameters)
|
|||||||
// Initialize the packet.
|
// Initialize the packet.
|
||||||
p->header.destination_id = data->destination_id;
|
p->header.destination_id = data->destination_id;
|
||||||
p->header.source_id = PIOS_RFM22B_DeviceID(pios_rfm22b_id);
|
p->header.source_id = PIOS_RFM22B_DeviceID(pios_rfm22b_id);
|
||||||
//p->header.type = PACKET_TYPE_ACKED_DATA;
|
|
||||||
p->header.type = PACKET_TYPE_DATA;
|
p->header.type = PACKET_TYPE_DATA;
|
||||||
p->data[0] = rx_byte;
|
p->data[0] = rx_byte;
|
||||||
p->header.data_size = 1;
|
p->header.data_size = 1;
|
||||||
@ -335,12 +397,19 @@ static void comUAVTalkTask(void *parameters)
|
|||||||
p->data[p->header.data_size++] = rx_byte;
|
p->data[p->header.data_size++] = rx_byte;
|
||||||
|
|
||||||
// Keep reading until we receive a completed packet.
|
// Keep reading until we receive a completed packet.
|
||||||
UAVTalkRxState state = UAVTalkProcessInputStreamQuiet(data->inUAVTalkCon, rx_byte);
|
UAVTalkRxState state = UAVTalkProcessInputStreamQuiet(params->UAVTalkCon, rx_byte);
|
||||||
UAVTalkConnectionData *connection = (UAVTalkConnectionData*)(data->inUAVTalkCon);
|
UAVTalkConnectionData *connection = (UAVTalkConnectionData*)(params->UAVTalkCon);
|
||||||
UAVTalkInputProcessor *iproc = &(connection->iproc);
|
UAVTalkInputProcessor *iproc = &(connection->iproc);
|
||||||
|
|
||||||
if (state == UAVTALK_STATE_COMPLETE)
|
if (state == UAVTALK_STATE_COMPLETE)
|
||||||
{
|
{
|
||||||
|
xQueueHandle sendQueue = params->sendQueue;
|
||||||
|
#if defined(PIOS_INCLUDE_USB)
|
||||||
|
if (params->gcsQueue)
|
||||||
|
if (PIOS_USB_CheckAvailable(0) && PIOS_COM_USB_HID)
|
||||||
|
sendQueue = params->gcsQueue;
|
||||||
|
#endif /* PIOS_INCLUDE_USB */
|
||||||
|
|
||||||
// Is this a local UAVObject?
|
// Is this a local UAVObject?
|
||||||
// We only generate GcsReceiver ojects, we don't consume them.
|
// We only generate GcsReceiver ojects, we don't consume them.
|
||||||
if ((iproc->obj != NULL) && (iproc->objId != GCSRECEIVER_OBJID))
|
if ((iproc->obj != NULL) && (iproc->objId != GCSRECEIVER_OBJID))
|
||||||
@ -359,11 +428,7 @@ static void comUAVTalkTask(void *parameters)
|
|||||||
if (obj_per.ObjectID == PIPXSETTINGS_OBJID)
|
if (obj_per.ObjectID == PIPXSETTINGS_OBJID)
|
||||||
{
|
{
|
||||||
// Queue up the ACK.
|
// Queue up the ACK.
|
||||||
UAVObjEvent ev;
|
queueEvent(params->recvQueue, (void*)iproc->obj, iproc->instId, EV_SEND_ACK);
|
||||||
ev.obj = iproc->obj;
|
|
||||||
ev.instId = iproc->instId;
|
|
||||||
ev.event = EV_SEND_ACK;
|
|
||||||
xQueueSend(data->objEventQueue, &ev, MAX_PORT_DELAY);
|
|
||||||
|
|
||||||
// Is this a save, load, or delete?
|
// Is this a save, load, or delete?
|
||||||
bool success = true;
|
bool success = true;
|
||||||
@ -390,6 +455,19 @@ static void comUAVTalkTask(void *parameters)
|
|||||||
int32_t ret = PIOS_EEPROM_Save((uint8_t*)&pipxSettings, sizeof(PipXSettingsData));
|
int32_t ret = PIOS_EEPROM_Save((uint8_t*)&pipxSettings, sizeof(PipXSettingsData));
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
success = false;
|
success = false;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case OBJECTPERSISTENCE_OPERATION_DELETE:
|
||||||
|
{
|
||||||
|
#if defined(PIOS_INCLUDE_FLASH_EEPROM)
|
||||||
|
// Erase the settings.
|
||||||
|
PipXSettingsData pipxSettings;
|
||||||
|
uint8_t *ptr = (uint8_t*)&pipxSettings;
|
||||||
|
memset(ptr, 0, sizeof(PipXSettingsData));
|
||||||
|
int32_t ret = PIOS_EEPROM_Save(ptr, sizeof(PipXSettingsData));
|
||||||
|
if (ret != 0)
|
||||||
|
success = false;
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -408,14 +486,11 @@ static void comUAVTalkTask(void *parameters)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Otherwise, queue the packet for transmission.
|
// Otherwise, queue the packet for transmission.
|
||||||
xQueueSend(data->sendPacketQueue, &p, MAX_PORT_DELAY);
|
queueEvent(sendQueue, (void*)p, 0, EV_TRANSMIT_PACKET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UAVObjEvent ev;
|
|
||||||
ev.obj = iproc->obj;
|
|
||||||
ev.instId = 0;
|
|
||||||
switch (iproc->type)
|
switch (iproc->type)
|
||||||
{
|
{
|
||||||
case UAVTALK_TYPE_OBJ:
|
case UAVTALK_TYPE_OBJ:
|
||||||
@ -424,16 +499,12 @@ static void comUAVTalkTask(void *parameters)
|
|||||||
break;
|
break;
|
||||||
case UAVTALK_TYPE_OBJ_REQ:
|
case UAVTALK_TYPE_OBJ_REQ:
|
||||||
// Queue up an object send request.
|
// Queue up an object send request.
|
||||||
ev.event = EV_UPDATE_REQ;
|
queueEvent(params->recvQueue, (void*)iproc->obj, iproc->instId, EV_UPDATE_REQ);
|
||||||
xQueueSend(data->objEventQueue, &ev, MAX_PORT_DELAY);
|
|
||||||
break;
|
break;
|
||||||
case UAVTALK_TYPE_OBJ_ACK:
|
case UAVTALK_TYPE_OBJ_ACK:
|
||||||
if (UAVObjUnpack(iproc->obj, iproc->instId, connection->rxBuffer) == 0)
|
if (UAVObjUnpack(iproc->obj, iproc->instId, connection->rxBuffer) == 0)
|
||||||
{
|
|
||||||
// Queue up an ACK
|
// Queue up an ACK
|
||||||
ev.event = EV_SEND_ACK;
|
queueEvent(params->recvQueue, (void*)iproc->obj, iproc->instId, EV_SEND_ACK);
|
||||||
xQueueSend(data->objEventQueue, &ev, MAX_PORT_DELAY);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -444,22 +515,24 @@ static void comUAVTalkTask(void *parameters)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Queue the packet for transmission.
|
// Queue the packet for transmission.
|
||||||
xQueueSend(data->sendPacketQueue, &p, MAX_PORT_DELAY);
|
queueEvent(sendQueue, (void*)p, 0, EV_TRANSMIT_PACKET);
|
||||||
}
|
}
|
||||||
p = NULL;
|
p = NULL;
|
||||||
|
|
||||||
} else if(state == UAVTALK_STATE_ERROR) {
|
} else if(state == UAVTALK_STATE_ERROR) {
|
||||||
DEBUG_PRINTF(1, "UAVTalk FAILED!\n\r");
|
xQueueHandle sendQueue = params->sendQueue;
|
||||||
|
#if defined(PIOS_INCLUDE_USB)
|
||||||
|
if (params->gcsQueue)
|
||||||
|
if (PIOS_USB_CheckAvailable(0) && PIOS_COM_USB_HID)
|
||||||
|
sendQueue = params->gcsQueue;
|
||||||
|
#endif /* PIOS_INCLUDE_USB */
|
||||||
data->UAVTalkErrors++;
|
data->UAVTalkErrors++;
|
||||||
|
|
||||||
// Send a NACK if required.
|
// Send a NACK if required.
|
||||||
if((iproc->obj) && (iproc->type == UAVTALK_TYPE_OBJ_ACK))
|
if((iproc->obj) && (iproc->type == UAVTALK_TYPE_OBJ_ACK))
|
||||||
{
|
{
|
||||||
// Queue up a NACK
|
// Queue up a NACK
|
||||||
UAVObjEvent ev;
|
queueEvent(params->recvQueue, iproc->obj, iproc->instId, EV_SEND_NACK);
|
||||||
ev.obj = iproc->obj;
|
|
||||||
ev.event = EV_SEND_NACK;
|
|
||||||
xQueueSend(data->objEventQueue, &ev, MAX_PORT_DELAY);
|
|
||||||
|
|
||||||
// Release the packet and start over again.
|
// Release the packet and start over again.
|
||||||
PHReleaseTXPacket(pios_packet_handler, p);
|
PHReleaseTXPacket(pios_packet_handler, p);
|
||||||
@ -467,7 +540,7 @@ static void comUAVTalkTask(void *parameters)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Transmit the packet anyway...
|
// Transmit the packet anyway...
|
||||||
xQueueSend(data->sendPacketQueue, &p, MAX_PORT_DELAY);
|
queueEvent(sendQueue, (void*)p, 0, EV_TRANSMIT_PACKET);
|
||||||
}
|
}
|
||||||
p = NULL;
|
p = NULL;
|
||||||
}
|
}
|
||||||
@ -512,7 +585,7 @@ static void radioReceiveTask(void *parameters)
|
|||||||
UAVObjEvent ev;
|
UAVObjEvent ev;
|
||||||
ev.obj = (UAVObjHandle)p;
|
ev.obj = (UAVObjHandle)p;
|
||||||
ev.event = EV_PACKET_RECEIVED;
|
ev.event = EV_PACKET_RECEIVED;
|
||||||
xQueueSend(data->objEventQueue, &ev, portMAX_DELAY);
|
xQueueSend(data->gcsEventQueue, &ev, portMAX_DELAY);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
data->packetErrors++;
|
data->packetErrors++;
|
||||||
@ -527,7 +600,7 @@ static void radioReceiveTask(void *parameters)
|
|||||||
*/
|
*/
|
||||||
static void sendPacketTask(void *parameters)
|
static void sendPacketTask(void *parameters)
|
||||||
{
|
{
|
||||||
PHPacketHandle p;
|
UAVObjEvent ev;
|
||||||
|
|
||||||
// Loop forever
|
// Loop forever
|
||||||
while (1) {
|
while (1) {
|
||||||
@ -536,19 +609,21 @@ static void sendPacketTask(void *parameters)
|
|||||||
//PIOS_WDG_UpdateFlag(PIOS_WDG_SENDPACKET);
|
//PIOS_WDG_UpdateFlag(PIOS_WDG_SENDPACKET);
|
||||||
#endif /* PIOS_INCLUDE_WDG */
|
#endif /* PIOS_INCLUDE_WDG */
|
||||||
// Wait for a packet on the queue.
|
// Wait for a packet on the queue.
|
||||||
if (xQueueReceive(data->sendPacketQueue, &p, MAX_PORT_DELAY) == pdTRUE) {
|
if (xQueueReceive(data->radioPacketQueue, &ev, MAX_PORT_DELAY) == pdTRUE) {
|
||||||
|
PHPacketHandle p = (PHPacketHandle)ev.obj;
|
||||||
// Send the packet.
|
// Send the packet.
|
||||||
if(!PHTransmitPacket(pios_packet_handler, p))
|
if(!PHTransmitPacket(pios_packet_handler, p))
|
||||||
PHReleaseTXPacket(pios_packet_handler, p);
|
PHReleaseRXPacket(pios_packet_handler, p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send packets to the radio.
|
* Send packets to the com port.
|
||||||
*/
|
*/
|
||||||
static void sendDataTask(void *parameters)
|
static void UAVTalkSendTask(void *parameters)
|
||||||
{
|
{
|
||||||
|
UAVTalkComTaskParams *params = (UAVTalkComTaskParams *)parameters;
|
||||||
UAVObjEvent ev;
|
UAVObjEvent ev;
|
||||||
|
|
||||||
// Loop forever
|
// Loop forever
|
||||||
@ -560,14 +635,15 @@ static void sendDataTask(void *parameters)
|
|||||||
//PIOS_WDG_UpdateFlag(PIOS_WDG_SENDDATA);
|
//PIOS_WDG_UpdateFlag(PIOS_WDG_SENDDATA);
|
||||||
#endif /* PIOS_INCLUDE_WDG */
|
#endif /* PIOS_INCLUDE_WDG */
|
||||||
// Wait for a packet on the queue.
|
// Wait for a packet on the queue.
|
||||||
if (xQueueReceive(data->objEventQueue, &ev, MAX_PORT_DELAY) == pdTRUE) {
|
if (xQueueReceive(params->recvQueue, &ev, MAX_PORT_DELAY) == pdTRUE) {
|
||||||
if ((ev.event == EV_UPDATED) || (ev.event == EV_UPDATE_REQ))
|
if ((ev.event == EV_UPDATED) || (ev.event == EV_UPDATE_REQ))
|
||||||
{
|
{
|
||||||
// Send update (with retries)
|
// Send update (with retries)
|
||||||
uint32_t retries = 0;
|
uint32_t retries = 0;
|
||||||
int32_t success = -1;
|
int32_t success = -1;
|
||||||
while (retries < MAX_RETRIES && success == -1) {
|
while (retries < MAX_RETRIES && success == -1) {
|
||||||
success = UAVTalkSendObject(data->outUAVTalkCon, ev.obj, 0, 0, RETRY_TIMEOUT_MS);
|
success = UAVTalkSendObject(params->UAVTalkCon, ev.obj, 0, 0, RETRY_TIMEOUT_MS) == 0;
|
||||||
|
if (!success)
|
||||||
++retries;
|
++retries;
|
||||||
}
|
}
|
||||||
data->comTxRetries += retries;
|
data->comTxRetries += retries;
|
||||||
@ -578,7 +654,8 @@ static void sendDataTask(void *parameters)
|
|||||||
uint32_t retries = 0;
|
uint32_t retries = 0;
|
||||||
int32_t success = -1;
|
int32_t success = -1;
|
||||||
while (retries < MAX_RETRIES && success == -1) {
|
while (retries < MAX_RETRIES && success == -1) {
|
||||||
success = UAVTalkSendAck(data->outUAVTalkCon, ev.obj, ev.instId);
|
success = UAVTalkSendAck(params->UAVTalkCon, ev.obj, ev.instId) == 0;
|
||||||
|
if (!success)
|
||||||
++retries;
|
++retries;
|
||||||
}
|
}
|
||||||
data->comTxRetries += retries;
|
data->comTxRetries += retries;
|
||||||
@ -589,7 +666,8 @@ static void sendDataTask(void *parameters)
|
|||||||
uint32_t retries = 0;
|
uint32_t retries = 0;
|
||||||
int32_t success = -1;
|
int32_t success = -1;
|
||||||
while (retries < MAX_RETRIES && success == -1) {
|
while (retries < MAX_RETRIES && success == -1) {
|
||||||
success = UAVTalkSendNack(data->outUAVTalkCon, UAVObjGetID(ev.obj));
|
success = UAVTalkSendNack(params->UAVTalkCon, UAVObjGetID(ev.obj)) == 0;
|
||||||
|
if (!success)
|
||||||
++retries;
|
++retries;
|
||||||
}
|
}
|
||||||
data->comTxRetries += retries;
|
data->comTxRetries += retries;
|
||||||
@ -599,6 +677,13 @@ static void sendDataTask(void *parameters)
|
|||||||
// Receive the packet.
|
// Receive the packet.
|
||||||
PHReceivePacket(pios_packet_handler, (PHPacketHandle)ev.obj, false);
|
PHReceivePacket(pios_packet_handler, (PHPacketHandle)ev.obj, false);
|
||||||
}
|
}
|
||||||
|
else if(ev.event == EV_TRANSMIT_PACKET)
|
||||||
|
{
|
||||||
|
// Transmit the packet.
|
||||||
|
PHPacketHandle p = (PHPacketHandle)ev.obj;
|
||||||
|
transmitData(params->comPort, p->data, p->header.data_size, params->checkHID);
|
||||||
|
PHReleaseTXPacket(pios_packet_handler, p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -675,7 +760,7 @@ static void transparentCommTask(void * parameters)
|
|||||||
if (send_packet)
|
if (send_packet)
|
||||||
{
|
{
|
||||||
// Queue the packet for transmission.
|
// Queue the packet for transmission.
|
||||||
xQueueSend(data->sendPacketQueue, &p, MAX_PORT_DELAY);
|
queueEvent(data->radioPacketQueue, (void*)p, 0, EV_TRANSMIT_PACKET);
|
||||||
|
|
||||||
// Reset the timeout
|
// Reset the timeout
|
||||||
timeout = MAX_PORT_DELAY;
|
timeout = MAX_PORT_DELAY;
|
||||||
@ -767,7 +852,7 @@ static void radioStatusTask(void *parameters)
|
|||||||
status_packet.dropped = data->droppedPackets;
|
status_packet.dropped = data->droppedPackets;
|
||||||
status_packet.resets = PIOS_RFM22B_Resets(pios_rfm22b_id);
|
status_packet.resets = PIOS_RFM22B_Resets(pios_rfm22b_id);
|
||||||
PHPacketHandle sph = (PHPacketHandle)&status_packet;
|
PHPacketHandle sph = (PHPacketHandle)&status_packet;
|
||||||
xQueueSend(data->sendPacketQueue, &sph, MAX_PORT_DELAY);
|
queueEvent(data->radioPacketQueue, (void*)sph, 0, EV_TRANSMIT_PACKET);
|
||||||
cntr = 0;
|
cntr = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -792,22 +877,52 @@ static void ppmInputTask(void *parameters)
|
|||||||
PIOS_WDG_UpdateFlag(PIOS_WDG_PPMINPUT);
|
PIOS_WDG_UpdateFlag(PIOS_WDG_PPMINPUT);
|
||||||
#endif /* PIOS_INCLUDE_WDG */
|
#endif /* PIOS_INCLUDE_WDG */
|
||||||
|
|
||||||
// Send the PPM packet
|
// Read the receiver.
|
||||||
for (uint8_t i = 1; i <= PIOS_PPM_NUM_INPUTS; ++i)
|
for (uint8_t i = 1; i <= PIOS_PPM_NUM_INPUTS; ++i)
|
||||||
ppm_packet.channels[i - 1] = PIOS_RCVR_Read(PIOS_PPM_RECEIVER, i);
|
ppm_packet.channels[i - 1] = PIOS_RCVR_Read(PIOS_PPM_RECEIVER, i);
|
||||||
|
|
||||||
// Send the packet.
|
// Send the PPM packet
|
||||||
|
if (data->ppmOutQueue)
|
||||||
|
{
|
||||||
ppm_packet.header.destination_id = data->destination_id;
|
ppm_packet.header.destination_id = data->destination_id;
|
||||||
ppm_packet.header.source_id = PIOS_RFM22B_DeviceID(pios_rfm22b_id);
|
ppm_packet.header.source_id = PIOS_RFM22B_DeviceID(pios_rfm22b_id);
|
||||||
ppm_packet.header.type = PACKET_TYPE_PPM;
|
ppm_packet.header.type = PACKET_TYPE_PPM;
|
||||||
ppm_packet.header.data_size = PH_PPM_DATA_SIZE(&ppm_packet);
|
ppm_packet.header.data_size = PH_PPM_DATA_SIZE(&ppm_packet);
|
||||||
xQueueSend(data->sendPacketQueue, &pph, MAX_PORT_DELAY);
|
queueEvent(data->ppmOutQueue, (void*)pph, 0, EV_TRANSMIT_PACKET);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
PPMHandler(ppm_packet.channels);
|
||||||
|
|
||||||
// Delay until the next update period.
|
// Delay until the next update period.
|
||||||
vTaskDelay(PIOS_PPM_PACKET_UPDATE_PERIOD_MS / portTICK_RATE_MS);
|
vTaskDelay(PIOS_PPM_PACKET_UPDATE_PERIOD_MS / portTICK_RATE_MS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transmit data buffer to the com port.
|
||||||
|
* \param[in] params The comm parameters.
|
||||||
|
* \param[in] buf Data buffer to send
|
||||||
|
* \param[in] length Length of buffer
|
||||||
|
* \return -1 on failure
|
||||||
|
* \return number of bytes transmitted on success
|
||||||
|
*/
|
||||||
|
static int32_t UAVTalkSend(UAVTalkComTaskParams *params, uint8_t *buf, int32_t length)
|
||||||
|
{
|
||||||
|
uint32_t outputPort = params->comPort;
|
||||||
|
#if defined(PIOS_INCLUDE_USB)
|
||||||
|
if (params->checkHID)
|
||||||
|
{
|
||||||
|
// Determine output port (USB takes priority over telemetry port)
|
||||||
|
if (PIOS_USB_CheckAvailable(0) && PIOS_COM_USB_HID)
|
||||||
|
outputPort = PIOS_COM_USB_HID;
|
||||||
|
}
|
||||||
|
#endif /* PIOS_INCLUDE_USB */
|
||||||
|
if(outputPort)
|
||||||
|
return PIOS_COM_SendBuffer(outputPort, buf, length);
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Transmit data buffer to the com port.
|
* Transmit data buffer to the com port.
|
||||||
* \param[in] buf Data buffer to send
|
* \param[in] buf Data buffer to send
|
||||||
@ -815,18 +930,21 @@ static void ppmInputTask(void *parameters)
|
|||||||
* \return -1 on failure
|
* \return -1 on failure
|
||||||
* \return number of bytes transmitted on success
|
* \return number of bytes transmitted on success
|
||||||
*/
|
*/
|
||||||
static int32_t transmitData(uint8_t *buf, int32_t length)
|
static int32_t UAVTalkSendHandler(uint8_t *buf, int32_t length)
|
||||||
{
|
{
|
||||||
uint32_t outputPort = PIOS_COM_UAVTALK;
|
return UAVTalkSend(&(data->uavtalk_params), buf, length);
|
||||||
#if defined(PIOS_INCLUDE_USB)
|
}
|
||||||
// Determine output port (USB takes priority over telemetry port)
|
|
||||||
if (PIOS_USB_CheckAvailable(0) && PIOS_COM_USB_HID)
|
/**
|
||||||
outputPort = PIOS_COM_USB_HID;
|
* Transmit data buffer to the com port.
|
||||||
#endif /* PIOS_INCLUDE_USB */
|
* \param[in] buf Data buffer to send
|
||||||
if(outputPort)
|
* \param[in] length Length of buffer
|
||||||
return PIOS_COM_SendBuffer(outputPort, buf, length);
|
* \return -1 on failure
|
||||||
else
|
* \return number of bytes transmitted on success
|
||||||
return -1;
|
*/
|
||||||
|
static int32_t GCSUAVTalkSendHandler(uint8_t *buf, int32_t length)
|
||||||
|
{
|
||||||
|
return UAVTalkSend(&(data->gcs_uavtalk_params), buf, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -847,22 +965,15 @@ static int32_t transmitPacket(PHPacketHandle p)
|
|||||||
* \param[in] buf The received data buffer
|
* \param[in] buf The received data buffer
|
||||||
* \param[in] length Length of buffer
|
* \param[in] length Length of buffer
|
||||||
*/
|
*/
|
||||||
static void receiveData(uint8_t *buf, uint8_t len, int8_t rssi, int8_t afc)
|
static void transmitData(uint32_t outputPort, uint8_t *buf, uint8_t len, bool checkHid)
|
||||||
{
|
{
|
||||||
data->RSSI = rssi;
|
|
||||||
|
|
||||||
// Packet data should go to transparent com if it's configured,
|
|
||||||
// USB HID if it's connected, otherwise, UAVTalk com if it's configured.
|
|
||||||
uint32_t outputPort = PIOS_COM_TRANS_COM;
|
|
||||||
if (!outputPort)
|
|
||||||
{
|
|
||||||
outputPort = PIOS_COM_UAVTALK;
|
|
||||||
#if defined(PIOS_INCLUDE_USB)
|
#if defined(PIOS_INCLUDE_USB)
|
||||||
|
// See if USB is connected if requested.
|
||||||
|
if(checkHid)
|
||||||
// Determine output port (USB takes priority over telemetry port)
|
// Determine output port (USB takes priority over telemetry port)
|
||||||
if (PIOS_USB_CheckAvailable(0) && PIOS_COM_USB_HID)
|
if (PIOS_USB_CheckAvailable(0) && PIOS_COM_USB_HID)
|
||||||
outputPort = PIOS_COM_USB_HID;
|
outputPort = PIOS_COM_USB_HID;
|
||||||
#endif /* PIOS_INCLUDE_USB */
|
#endif /* PIOS_INCLUDE_USB */
|
||||||
}
|
|
||||||
if (!outputPort)
|
if (!outputPort)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -872,6 +983,22 @@ static void receiveData(uint8_t *buf, uint8_t len, int8_t rssi, int8_t afc)
|
|||||||
data->comTxErrors++;
|
data->comTxErrors++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Receive a packet
|
||||||
|
* \param[in] buf The received data buffer
|
||||||
|
* \param[in] length Length of buffer
|
||||||
|
*/
|
||||||
|
static void receiveData(uint8_t *buf, uint8_t len, int8_t rssi, int8_t afc)
|
||||||
|
{
|
||||||
|
data->RSSI = rssi;
|
||||||
|
|
||||||
|
// Packet data should go to transparent com if it's configured,
|
||||||
|
// USB HID if it's connected, otherwise, UAVTalk com if it's configured.
|
||||||
|
uint32_t outputPort = PIOS_COM_TRANS_COM ? PIOS_COM_TRANS_COM : PIOS_COM_UAVTALK;
|
||||||
|
bool checkHid = (PIOS_COM_TRANS_COM == 0);
|
||||||
|
transmitData(outputPort, buf, len, checkHid);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receive a status packet
|
* Receive a status packet
|
||||||
* \param[in] status The status structure
|
* \param[in] status The status structure
|
||||||
@ -987,6 +1114,21 @@ static void BufferedReadSetCom(BufferedReadHandle h, uint32_t com_port)
|
|||||||
h->com_port = com_port;
|
h->com_port = com_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Queue and event into an event queue.
|
||||||
|
* \param[in] queue The event queue
|
||||||
|
* \param[in] obj The data pointer
|
||||||
|
* \param[in] type The event type
|
||||||
|
*/
|
||||||
|
static void queueEvent(xQueueHandle queue, void *obj, uint16_t instId, UAVObjEventType type)
|
||||||
|
{
|
||||||
|
UAVObjEvent ev;
|
||||||
|
ev.obj = (UAVObjHandle)obj;
|
||||||
|
ev.instId = instId;
|
||||||
|
ev.event = type;
|
||||||
|
xQueueSend(queue, &ev, portMAX_DELAY);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the telemetry settings, called on startup.
|
* Update the telemetry settings, called on startup.
|
||||||
* FIXME: This should be in the TelemetrySettings object. But objects
|
* FIXME: This should be in the TelemetrySettings object. But objects
|
||||||
@ -1003,7 +1145,6 @@ static void updateSettings()
|
|||||||
|
|
||||||
// Initialize the destination ID
|
// Initialize the destination ID
|
||||||
data->destination_id = pipxSettings.PairID ? pipxSettings.PairID : 0xffffffff;
|
data->destination_id = pipxSettings.PairID ? pipxSettings.PairID : 0xffffffff;
|
||||||
DEBUG_PRINTF(2, "PairID: %x\n\r", data->destination_id);
|
|
||||||
|
|
||||||
if (PIOS_COM_TELEMETRY) {
|
if (PIOS_COM_TELEMETRY) {
|
||||||
switch (pipxSettings.TelemetrySpeed) {
|
switch (pipxSettings.TelemetrySpeed) {
|
||||||
|
@ -77,6 +77,7 @@ TIM4 | RC In 1 | Servo 3 | Servo 2 | Servo 1
|
|||||||
#define PIOS_WDG_SENDDATA 0x0008
|
#define PIOS_WDG_SENDDATA 0x0008
|
||||||
#define PIOS_WDG_TRANSCOMM 0x0010
|
#define PIOS_WDG_TRANSCOMM 0x0010
|
||||||
#define PIOS_WDG_PPMINPUT 0x0020
|
#define PIOS_WDG_PPMINPUT 0x0020
|
||||||
|
#define PIOS_WDG_COMGCS 0x0040
|
||||||
|
|
||||||
//------------------------
|
//------------------------
|
||||||
// TELEMETRY
|
// TELEMETRY
|
||||||
@ -157,6 +158,7 @@ extern uint32_t pios_com_telemetry_id;
|
|||||||
extern uint32_t pios_com_flexi_id;
|
extern uint32_t pios_com_flexi_id;
|
||||||
extern uint32_t pios_com_vcp_id;
|
extern uint32_t pios_com_vcp_id;
|
||||||
extern uint32_t pios_com_uavtalk_com_id;
|
extern uint32_t pios_com_uavtalk_com_id;
|
||||||
|
extern uint32_t pios_com_gcs_com_id;
|
||||||
extern uint32_t pios_com_trans_com_id;
|
extern uint32_t pios_com_trans_com_id;
|
||||||
extern uint32_t pios_com_debug_id;
|
extern uint32_t pios_com_debug_id;
|
||||||
extern uint32_t pios_com_rfm22b_id;
|
extern uint32_t pios_com_rfm22b_id;
|
||||||
@ -166,6 +168,7 @@ extern uint32_t pios_ppm_rcvr_id;
|
|||||||
#define PIOS_COM_FLEXI (pios_com_flexi_id)
|
#define PIOS_COM_FLEXI (pios_com_flexi_id)
|
||||||
#define PIOS_COM_VCP (pios_com_vcp_id)
|
#define PIOS_COM_VCP (pios_com_vcp_id)
|
||||||
#define PIOS_COM_UAVTALK (pios_com_uavtalk_com_id)
|
#define PIOS_COM_UAVTALK (pios_com_uavtalk_com_id)
|
||||||
|
#define PIOS_COM_GCS (pios_com_gcs_com_id)
|
||||||
#define PIOS_COM_TRANS_COM (pios_com_trans_com_id)
|
#define PIOS_COM_TRANS_COM (pios_com_trans_com_id)
|
||||||
#define PIOS_COM_DEBUG (pios_com_debug_id)
|
#define PIOS_COM_DEBUG (pios_com_debug_id)
|
||||||
#define PIOS_COM_RADIO (pios_com_rfm22b_id)
|
#define PIOS_COM_RADIO (pios_com_rfm22b_id)
|
||||||
|
@ -53,7 +53,7 @@ USE_GPS ?= NO
|
|||||||
USE_I2C ?= YES
|
USE_I2C ?= YES
|
||||||
|
|
||||||
# Set to YES when using Code Sourcery toolchain
|
# Set to YES when using Code Sourcery toolchain
|
||||||
CODE_SOURCERY ?= YES
|
CODE_SOURCERY ?= NO
|
||||||
|
|
||||||
# Remove command is different for Code Sourcery on Windows
|
# Remove command is different for Code Sourcery on Windows
|
||||||
ifeq ($(CODE_SOURCERY), YES)
|
ifeq ($(CODE_SOURCERY), YES)
|
||||||
|
@ -33,26 +33,27 @@
|
|||||||
#include <pipxsettings.h>
|
#include <pipxsettings.h>
|
||||||
#include <board_hw_defs.c>
|
#include <board_hw_defs.c>
|
||||||
|
|
||||||
#define PIOS_COM_SERIAL_RX_BUF_LEN 256
|
#define PIOS_COM_SERIAL_RX_BUF_LEN 128
|
||||||
#define PIOS_COM_SERIAL_TX_BUF_LEN 256
|
#define PIOS_COM_SERIAL_TX_BUF_LEN 128
|
||||||
|
|
||||||
#define PIOS_COM_FLEXI_RX_BUF_LEN 256
|
#define PIOS_COM_FLEXI_RX_BUF_LEN 128
|
||||||
#define PIOS_COM_FLEXI_TX_BUF_LEN 256
|
#define PIOS_COM_FLEXI_TX_BUF_LEN 128
|
||||||
|
|
||||||
#define PIOS_COM_TELEM_USB_RX_BUF_LEN 256
|
#define PIOS_COM_TELEM_USB_RX_BUF_LEN 128
|
||||||
#define PIOS_COM_TELEM_USB_TX_BUF_LEN 256
|
#define PIOS_COM_TELEM_USB_TX_BUF_LEN 128
|
||||||
|
|
||||||
#define PIOS_COM_VCP_USB_RX_BUF_LEN 256
|
#define PIOS_COM_VCP_USB_RX_BUF_LEN 128
|
||||||
#define PIOS_COM_VCP_USB_TX_BUF_LEN 256
|
#define PIOS_COM_VCP_USB_TX_BUF_LEN 128
|
||||||
|
|
||||||
#define PIOS_COM_RFM22B_RF_RX_BUF_LEN 256
|
#define PIOS_COM_RFM22B_RF_RX_BUF_LEN 128
|
||||||
#define PIOS_COM_RFM22B_RF_TX_BUF_LEN 256
|
#define PIOS_COM_RFM22B_RF_TX_BUF_LEN 128
|
||||||
|
|
||||||
uint32_t pios_com_telem_usb_id = 0;
|
uint32_t pios_com_telem_usb_id = 0;
|
||||||
uint32_t pios_com_telemetry_id;
|
uint32_t pios_com_telemetry_id;
|
||||||
uint32_t pios_com_flexi_id;
|
uint32_t pios_com_flexi_id;
|
||||||
uint32_t pios_com_vcp_id;
|
uint32_t pios_com_vcp_id;
|
||||||
uint32_t pios_com_uavtalk_com_id = 0;
|
uint32_t pios_com_uavtalk_com_id = 0;
|
||||||
|
uint32_t pios_com_gcs_com_id = 0;
|
||||||
uint32_t pios_com_trans_com_id = 0;
|
uint32_t pios_com_trans_com_id = 0;
|
||||||
uint32_t pios_com_debug_id = 0;
|
uint32_t pios_com_debug_id = 0;
|
||||||
uint32_t pios_com_rfm22b_id = 0;
|
uint32_t pios_com_rfm22b_id = 0;
|
||||||
@ -129,20 +130,17 @@ void PIOS_Board_Init(void) {
|
|||||||
|
|
||||||
|
|
||||||
/* Flags to determine if various USB interfaces are advertised */
|
/* Flags to determine if various USB interfaces are advertised */
|
||||||
bool usb_hid_present = false;
|
|
||||||
bool usb_cdc_present = false;
|
bool usb_cdc_present = false;
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_USB_CDC)
|
#if defined(PIOS_INCLUDE_USB_CDC)
|
||||||
if (PIOS_USB_DESC_HID_CDC_Init()) {
|
if (PIOS_USB_DESC_HID_CDC_Init()) {
|
||||||
PIOS_Assert(0);
|
PIOS_Assert(0);
|
||||||
}
|
}
|
||||||
usb_hid_present = true;
|
|
||||||
usb_cdc_present = true;
|
usb_cdc_present = true;
|
||||||
#else
|
#else
|
||||||
if (PIOS_USB_DESC_HID_ONLY_Init()) {
|
if (PIOS_USB_DESC_HID_ONLY_Init()) {
|
||||||
PIOS_Assert(0);
|
PIOS_Assert(0);
|
||||||
}
|
}
|
||||||
usb_hid_present = true;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint32_t pios_usb_id;
|
uint32_t pios_usb_id;
|
||||||
@ -172,7 +170,7 @@ void PIOS_Board_Init(void) {
|
|||||||
tx_buffer, PIOS_COM_VCP_USB_TX_BUF_LEN)) {
|
tx_buffer, PIOS_COM_VCP_USB_TX_BUF_LEN)) {
|
||||||
PIOS_Assert(0);
|
PIOS_Assert(0);
|
||||||
}
|
}
|
||||||
switch (pipxSettings.TelemetryConfig)
|
switch (pipxSettings.VCPConfig)
|
||||||
{
|
{
|
||||||
case PIPXSETTINGS_VCPCONFIG_SERIAL:
|
case PIPXSETTINGS_VCPCONFIG_SERIAL:
|
||||||
pios_com_trans_com_id = pios_com_vcp_id;
|
pios_com_trans_com_id = pios_com_vcp_id;
|
||||||
@ -218,6 +216,7 @@ void PIOS_Board_Init(void) {
|
|||||||
{
|
{
|
||||||
case PIPXSETTINGS_TELEMETRYCONFIG_SERIAL:
|
case PIPXSETTINGS_TELEMETRYCONFIG_SERIAL:
|
||||||
case PIPXSETTINGS_TELEMETRYCONFIG_UAVTALK:
|
case PIPXSETTINGS_TELEMETRYCONFIG_UAVTALK:
|
||||||
|
case PIPXSETTINGS_TELEMETRYCONFIG_GCS:
|
||||||
case PIPXSETTINGS_TELEMETRYCONFIG_DEBUG:
|
case PIPXSETTINGS_TELEMETRYCONFIG_DEBUG:
|
||||||
{
|
{
|
||||||
uint32_t pios_usart1_id;
|
uint32_t pios_usart1_id;
|
||||||
@ -241,6 +240,9 @@ void PIOS_Board_Init(void) {
|
|||||||
case PIPXSETTINGS_TELEMETRYCONFIG_UAVTALK:
|
case PIPXSETTINGS_TELEMETRYCONFIG_UAVTALK:
|
||||||
pios_com_uavtalk_com_id = pios_com_telemetry_id;
|
pios_com_uavtalk_com_id = pios_com_telemetry_id;
|
||||||
break;
|
break;
|
||||||
|
case PIPXSETTINGS_TELEMETRYCONFIG_GCS:
|
||||||
|
pios_com_gcs_com_id = pios_com_telemetry_id;
|
||||||
|
break;
|
||||||
case PIPXSETTINGS_TELEMETRYCONFIG_DEBUG:
|
case PIPXSETTINGS_TELEMETRYCONFIG_DEBUG:
|
||||||
pios_com_debug_id = pios_com_telemetry_id;
|
pios_com_debug_id = pios_com_telemetry_id;
|
||||||
break;
|
break;
|
||||||
@ -256,6 +258,7 @@ void PIOS_Board_Init(void) {
|
|||||||
{
|
{
|
||||||
case PIPXSETTINGS_FLEXICONFIG_SERIAL:
|
case PIPXSETTINGS_FLEXICONFIG_SERIAL:
|
||||||
case PIPXSETTINGS_FLEXICONFIG_UAVTALK:
|
case PIPXSETTINGS_FLEXICONFIG_UAVTALK:
|
||||||
|
case PIPXSETTINGS_FLEXICONFIG_GCS:
|
||||||
case PIPXSETTINGS_FLEXICONFIG_DEBUG:
|
case PIPXSETTINGS_FLEXICONFIG_DEBUG:
|
||||||
{
|
{
|
||||||
uint32_t pios_usart3_id;
|
uint32_t pios_usart3_id;
|
||||||
@ -279,6 +282,9 @@ void PIOS_Board_Init(void) {
|
|||||||
case PIPXSETTINGS_FLEXICONFIG_UAVTALK:
|
case PIPXSETTINGS_FLEXICONFIG_UAVTALK:
|
||||||
pios_com_uavtalk_com_id = pios_com_flexi_id;
|
pios_com_uavtalk_com_id = pios_com_flexi_id;
|
||||||
break;
|
break;
|
||||||
|
case PIPXSETTINGS_FLEXICONFIG_GCS:
|
||||||
|
pios_com_gcs_com_id = pios_com_flexi_id;
|
||||||
|
break;
|
||||||
case PIPXSETTINGS_FLEXICONFIG_DEBUG:
|
case PIPXSETTINGS_FLEXICONFIG_DEBUG:
|
||||||
pios_com_debug_id = pios_com_flexi_id;
|
pios_com_debug_id = pios_com_flexi_id;
|
||||||
break;
|
break;
|
||||||
|
@ -2775,7 +2775,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border: none;">
|
<td style="border: none;">
|
||||||
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:14pt; font-weight:600; color:#ff0000;">SETTING UP FEED FORWARD IS DANGEROUS</span></p>
|
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Ubuntu'; font-size:14pt; font-weight:600; color:#ff0000;">SETTING UP FEED FORWARD NEEDS CAUTION</span></p>
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:11pt;"></p>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Ubuntu'; font-size:11pt;"></p>
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;">Beware: Feed Forward Tuning will launch all engines around mid-throttle, you have been warned!</span></p>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;">Beware: Feed Forward Tuning will launch all engines around mid-throttle, you have been warned!</span></p>
|
||||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;">Remove your props initially, and for fine-tuning, make sure your airframe is safely held in place. Wear glasses and protect your face and body.</span></p></td></tr></table></body></html></string>
|
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Lucida Grande'; font-size:13pt;">Remove your props initially, and for fine-tuning, make sure your airframe is safely held in place. Wear glasses and protect your face and body.</span></p></td></tr></table></body></html></string>
|
||||||
|
@ -71,6 +71,8 @@ ConfigPipXtremeWidget::ConfigPipXtremeWidget(QWidget *parent) : ConfigTaskWidget
|
|||||||
addUAVObjectToWidgetRelation("PipXStatus", "MinFrequency", m_pipx->MinFrequency);
|
addUAVObjectToWidgetRelation("PipXStatus", "MinFrequency", m_pipx->MinFrequency);
|
||||||
addUAVObjectToWidgetRelation("PipXStatus", "MaxFrequency", m_pipx->MaxFrequency);
|
addUAVObjectToWidgetRelation("PipXStatus", "MaxFrequency", m_pipx->MaxFrequency);
|
||||||
addUAVObjectToWidgetRelation("PipXStatus", "FrequencyStepSize", m_pipx->FrequencyStepSize);
|
addUAVObjectToWidgetRelation("PipXStatus", "FrequencyStepSize", m_pipx->FrequencyStepSize);
|
||||||
|
addUAVObjectToWidgetRelation("PipXStatus", "FrequencyBand", m_pipx->FreqBand);
|
||||||
|
addUAVObjectToWidgetRelation("PipXStatus", "RSSI", m_pipx->RSSI);
|
||||||
addUAVObjectToWidgetRelation("PipXStatus", "AFC", m_pipx->RxAFC);
|
addUAVObjectToWidgetRelation("PipXStatus", "AFC", m_pipx->RxAFC);
|
||||||
addUAVObjectToWidgetRelation("PipXStatus", "Retries", m_pipx->Retries);
|
addUAVObjectToWidgetRelation("PipXStatus", "Retries", m_pipx->Retries);
|
||||||
addUAVObjectToWidgetRelation("PipXStatus", "Errors", m_pipx->Errors);
|
addUAVObjectToWidgetRelation("PipXStatus", "Errors", m_pipx->Errors);
|
||||||
@ -81,6 +83,7 @@ ConfigPipXtremeWidget::ConfigPipXtremeWidget(QWidget *parent) : ConfigTaskWidget
|
|||||||
addUAVObjectToWidgetRelation("PipXStatus", "TXRate", m_pipx->TXRate);
|
addUAVObjectToWidgetRelation("PipXStatus", "TXRate", m_pipx->TXRate);
|
||||||
|
|
||||||
// Connect to the pair ID radio buttons.
|
// Connect to the pair ID radio buttons.
|
||||||
|
connect(m_pipx->PairSelectB, SIGNAL(toggled(bool)), this, SLOT(pairBToggled(bool)));
|
||||||
connect(m_pipx->PairSelect1, SIGNAL(toggled(bool)), this, SLOT(pair1Toggled(bool)));
|
connect(m_pipx->PairSelect1, SIGNAL(toggled(bool)), this, SLOT(pair1Toggled(bool)));
|
||||||
connect(m_pipx->PairSelect2, SIGNAL(toggled(bool)), this, SLOT(pair2Toggled(bool)));
|
connect(m_pipx->PairSelect2, SIGNAL(toggled(bool)), this, SLOT(pair2Toggled(bool)));
|
||||||
connect(m_pipx->PairSelect3, SIGNAL(toggled(bool)), this, SLOT(pair3Toggled(bool)));
|
connect(m_pipx->PairSelect3, SIGNAL(toggled(bool)), this, SLOT(pair3Toggled(bool)));
|
||||||
@ -89,6 +92,7 @@ ConfigPipXtremeWidget::ConfigPipXtremeWidget(QWidget *parent) : ConfigTaskWidget
|
|||||||
//Add scroll bar when necessary
|
//Add scroll bar when necessary
|
||||||
QScrollArea *scroll = new QScrollArea;
|
QScrollArea *scroll = new QScrollArea;
|
||||||
scroll->setWidget(m_pipx->frame_3);
|
scroll->setWidget(m_pipx->frame_3);
|
||||||
|
scroll->setWidgetResizable(true);
|
||||||
m_pipx->verticalLayout_3->addWidget(scroll);
|
m_pipx->verticalLayout_3->addWidget(scroll);
|
||||||
|
|
||||||
// Request and update of the setting object.
|
// Request and update of the setting object.
|
||||||
@ -148,7 +152,7 @@ void ConfigPipXtremeWidget::updateStatus(UAVObject *object)
|
|||||||
PipXSettings *pipxSettings = PipXSettings::GetInstance(getObjectManager());
|
PipXSettings *pipxSettings = PipXSettings::GetInstance(getObjectManager());
|
||||||
quint32 pairID = 0;
|
quint32 pairID = 0;
|
||||||
if (pipxSettings)
|
if (pipxSettings)
|
||||||
pipxSettings->getPairID();
|
pairID = pipxSettings->getPairID();
|
||||||
|
|
||||||
// Update the detected devices.
|
// Update the detected devices.
|
||||||
UAVObjectField* pairIdField = object->getField("PairIDs");
|
UAVObjectField* pairIdField = object->getField("PairIDs");
|
||||||
@ -245,6 +249,9 @@ void ConfigPipXtremeWidget::updateStatus(UAVObject *object)
|
|||||||
qDebug() << "PipXtremeGadgetWidget: Count not read DeviceID field.";
|
qDebug() << "PipXtremeGadgetWidget: Count not read DeviceID field.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the PairID field
|
||||||
|
m_pipx->PairID->setText(QString::number(pairID, 16).toUpper());
|
||||||
|
|
||||||
// Update the link state
|
// Update the link state
|
||||||
UAVObjectField* linkField = object->getField("LinkState");
|
UAVObjectField* linkField = object->getField("LinkState");
|
||||||
if (linkField) {
|
if (linkField) {
|
||||||
@ -283,12 +290,19 @@ void ConfigPipXtremeWidget::pairIDToggled(bool checked, quint8 idx)
|
|||||||
PipXSettings *pipxSettings = PipXSettings::GetInstance(getObjectManager());
|
PipXSettings *pipxSettings = PipXSettings::GetInstance(getObjectManager());
|
||||||
|
|
||||||
if (pipxStatus && pipxSettings)
|
if (pipxStatus && pipxSettings)
|
||||||
|
{
|
||||||
|
if (idx == 4)
|
||||||
|
{
|
||||||
|
pipxSettings->setPairID(0);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
quint32 pairID = pipxStatus->getPairIDs(idx);
|
quint32 pairID = pipxStatus->getPairIDs(idx);
|
||||||
if (pairID)
|
if (pairID)
|
||||||
pipxSettings->setPairID(pairID);
|
pipxSettings->setPairID(pairID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigPipXtremeWidget::pair1Toggled(bool checked)
|
void ConfigPipXtremeWidget::pair1Toggled(bool checked)
|
||||||
@ -311,6 +325,11 @@ void ConfigPipXtremeWidget::pair4Toggled(bool checked)
|
|||||||
pairIDToggled(checked, 3);
|
pairIDToggled(checked, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConfigPipXtremeWidget::pairBToggled(bool checked)
|
||||||
|
{
|
||||||
|
pairIDToggled(checked, 4);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@}
|
@}
|
||||||
@}
|
@}
|
||||||
|
@ -63,6 +63,7 @@ private slots:
|
|||||||
void pair2Toggled(bool checked);
|
void pair2Toggled(bool checked);
|
||||||
void pair3Toggled(bool checked);
|
void pair3Toggled(bool checked);
|
||||||
void pair4Toggled(bool checked);
|
void pair4Toggled(bool checked);
|
||||||
|
void pairBToggled(bool checked);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CONFIGTXPIDWIDGET_H
|
#endif // CONFIGTXPIDWIDGET_H
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>840</width>
|
<width>834</width>
|
||||||
<height>862</height>
|
<height>772</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -63,9 +63,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="submitButtons">
|
<layout class="QHBoxLayout" name="submitButtons">
|
||||||
<property name="spacing">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
@ -84,7 +81,7 @@
|
|||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
<height>20</height>
|
<height>5</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
@ -138,16 +135,56 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
|
<widget class="QRadioButton" name="PairSelectB">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="PairIDB">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Broadcast</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="PaidIDBLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Broadcast Address</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
<widget class="QRadioButton" name="PairSelect1">
|
<widget class="QRadioButton" name="PairSelect1">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1" colspan="2">
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="PairID1"/>
|
<widget class="QLineEdit" name="PairID1">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>12345678</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="3">
|
<item row="1" column="2">
|
||||||
<widget class="QProgressBar" name="PairSignalStrengthBar1">
|
<widget class="QProgressBar" name="PairSignalStrengthBar1">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-127</number>
|
<number>-127</number>
|
||||||
@ -166,17 +203,31 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="3">
|
||||||
|
<widget class="QLabel" name="PairSignalStrengthLabel1">
|
||||||
|
<property name="text">
|
||||||
|
<string>-100dB</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
<widget class="QRadioButton" name="PairSelect2">
|
<widget class="QRadioButton" name="PairSelect2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="2">
|
<item row="2" column="1">
|
||||||
<widget class="QLineEdit" name="PairID2"/>
|
<widget class="QLineEdit" name="PairID2">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="3">
|
<item row="2" column="2">
|
||||||
<widget class="QProgressBar" name="PairSignalStrengthBar2">
|
<widget class="QProgressBar" name="PairSignalStrengthBar2">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-127</number>
|
<number>-127</number>
|
||||||
@ -195,17 +246,31 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="3">
|
||||||
|
<widget class="QLabel" name="PairSignalStrengthLabel2">
|
||||||
|
<property name="text">
|
||||||
|
<string>-100dB</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
<widget class="QRadioButton" name="PairSelect3">
|
<widget class="QRadioButton" name="PairSelect3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1" colspan="2">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="PairID3"/>
|
<widget class="QLineEdit" name="PairID3">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="3">
|
<item row="3" column="2">
|
||||||
<widget class="QProgressBar" name="PairSignalStrengthBar3">
|
<widget class="QProgressBar" name="PairSignalStrengthBar3">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-127</number>
|
<number>-127</number>
|
||||||
@ -224,17 +289,31 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="3">
|
||||||
|
<widget class="QLabel" name="PairSignalStrengthLabel3">
|
||||||
|
<property name="text">
|
||||||
|
<string>-100dB</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
<widget class="QRadioButton" name="PairSelect4">
|
<widget class="QRadioButton" name="PairSelect4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1" colspan="2">
|
<item row="4" column="1">
|
||||||
<widget class="QLineEdit" name="PairID4"/>
|
<widget class="QLineEdit" name="PairID4">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="3">
|
<item row="4" column="2">
|
||||||
<widget class="QProgressBar" name="PairSignalStrengthBar4">
|
<widget class="QProgressBar" name="PairSignalStrengthBar4">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<number>-127</number>
|
<number>-127</number>
|
||||||
@ -253,28 +332,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="4">
|
<item row="4" column="3">
|
||||||
<widget class="QLabel" name="PairSignalStrengthLabel1">
|
|
||||||
<property name="text">
|
|
||||||
<string>-100dB</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4">
|
|
||||||
<widget class="QLabel" name="PairSignalStrengthLabel2">
|
|
||||||
<property name="text">
|
|
||||||
<string>-100dB</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="4">
|
|
||||||
<widget class="QLabel" name="PairSignalStrengthLabel3">
|
|
||||||
<property name="text">
|
|
||||||
<string>-100dB</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="4">
|
|
||||||
<widget class="QLabel" name="PairSignalStrengthLabel4">
|
<widget class="QLabel" name="PairSignalStrengthLabel4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-100dB</string>
|
<string>-100dB</string>
|
||||||
@ -288,7 +346,7 @@
|
|||||||
<widget class="QGroupBox" name="groupBox_3">
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>400</width>
|
<width>430</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -305,15 +363,27 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Firmware Version</string>
|
<string>Firmware Ver.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1" colspan="3">
|
||||||
<widget class="QLineEdit" name="FirmwareVersion">
|
<widget class="QLineEdit" name="FirmwareVersion">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
@ -324,7 +394,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -348,7 +418,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1" colspan="3">
|
||||||
<widget class="QLineEdit" name="SerialNumber">
|
<widget class="QLineEdit" name="SerialNumber">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -356,6 +426,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
@ -379,7 +455,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -396,6 +472,108 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
|
<widget class="QLabel" name="DeviceIDLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Device ID</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="1">
|
||||||
|
<widget class="QLineEdit" name="DeviceID">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QLineEdit {
|
||||||
|
border: none;
|
||||||
|
border-radius: 1px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: rgba(0, 0, 0, 16);
|
||||||
|
/* background: transparent; */
|
||||||
|
/* selection-background-color: darkgray;*/
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="frame">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>12345678</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2">
|
||||||
|
<widget class="QLabel" name="PairIDLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Pair ID</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="3">
|
||||||
|
<widget class="QLineEdit" name="PairID">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QLineEdit {
|
||||||
|
border: none;
|
||||||
|
border-radius: 1px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: rgba(0, 0, 0, 16);
|
||||||
|
/* background: transparent; */
|
||||||
|
/* selection-background-color: darkgray;*/
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="frame">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>90ABCDEF</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -414,9 +592,15 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>101</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -433,7 +617,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -447,7 +631,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="4" column="2">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Max Frequency</string>
|
<string>Max Frequency</string>
|
||||||
@ -457,7 +641,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="4" column="3">
|
||||||
<widget class="QLineEdit" name="MaxFrequency">
|
<widget class="QLineEdit" name="MaxFrequency">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -467,7 +651,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>101</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -484,7 +668,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -498,7 +682,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="label_12">
|
<widget class="QLabel" name="label_12">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Freq. Step Size</string>
|
<string>Freq. Step Size</string>
|
||||||
@ -508,7 +692,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="QLineEdit" name="FrequencyStepSize">
|
<widget class="QLineEdit" name="FrequencyStepSize">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
@ -516,9 +700,15 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>101</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -535,7 +725,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -549,7 +739,232 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="2">
|
||||||
|
<widget class="QLabel" name="FreqBandLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Freq. Band</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="3">
|
||||||
|
<widget class="QLineEdit" name="FreqBand">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>The current frequency band</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QLineEdit {
|
||||||
|
border: none;
|
||||||
|
border-radius: 1px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: rgba(0, 0, 0, 16);
|
||||||
|
/* background: transparent; */
|
||||||
|
/* selection-background-color: darkgray;*/
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="RSSILabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>RSSI</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="1">
|
||||||
|
<widget class="QLineEdit" name="RSSI">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QLineEdit {
|
||||||
|
border: none;
|
||||||
|
border-radius: 1px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: rgba(0, 0, 0, 16);
|
||||||
|
/* background: transparent; */
|
||||||
|
/* selection-background-color: darkgray;*/
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="2">
|
||||||
|
<widget class="QLabel" name="RxAFCLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Rx AFC</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="3">
|
||||||
|
<widget class="QLineEdit" name="RxAFC">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QLineEdit {
|
||||||
|
border: none;
|
||||||
|
border-radius: 1px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: rgba(0, 0, 0, 16);
|
||||||
|
/* background: transparent; */
|
||||||
|
/* selection-background-color: darkgray;*/
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="7" column="0">
|
||||||
|
<widget class="QLabel" name="TXRateLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>TX Rate (B/s)</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="1">
|
||||||
|
<widget class="QLineEdit" name="TXRate">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QLineEdit {
|
||||||
|
border: none;
|
||||||
|
border-radius: 1px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: rgba(0, 0, 0, 16);
|
||||||
|
/* background: transparent; */
|
||||||
|
/* selection-background-color: darkgray;*/
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="frame">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="2">
|
||||||
|
<widget class="QLabel" name="RXRateLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>RX Rate (B/s)</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="3">
|
||||||
|
<widget class="QLineEdit" name="RXRate">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<weight>75</weight>
|
||||||
|
<bold>true</bold>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QLineEdit {
|
||||||
|
border: none;
|
||||||
|
border-radius: 1px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: rgba(0, 0, 0, 16);
|
||||||
|
/* background: transparent; */
|
||||||
|
/* selection-background-color: darkgray;*/
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<property name="frame">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Link State</string>
|
<string>Link State</string>
|
||||||
@ -559,17 +974,23 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="8" column="1">
|
||||||
<widget class="QLineEdit" name="LinkState">
|
<widget class="QLineEdit" name="LinkState">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>101</width>
|
||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -586,7 +1007,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 3px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -598,20 +1019,29 @@
|
|||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Disconnected</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="8" column="2">
|
||||||
<widget class="QLabel" name="label_17">
|
<widget class="QLabel" name="label_19">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rx AFC</string>
|
<string>Errors</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="1">
|
<item row="8" column="3">
|
||||||
<widget class="QLineEdit" name="RxAFC">
|
<widget class="QLineEdit" name="Errors">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
@ -622,12 +1052,15 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
}</string>
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="frame">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -645,6 +1078,18 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="9" column="1">
|
<item row="9" column="1">
|
||||||
<widget class="QLineEdit" name="Retries">
|
<widget class="QLineEdit" name="Retries">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
@ -655,7 +1100,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -669,8 +1114,24 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="1">
|
<item row="9" column="2">
|
||||||
<widget class="QLineEdit" name="Errors">
|
<widget class="QLabel" name="UAVTalkErrorsLabel">
|
||||||
|
<property name="text">
|
||||||
|
<string>UAVTalk Errors</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="3">
|
||||||
|
<widget class="QLineEdit" name="UAVTalkErrors">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
@ -681,7 +1142,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -696,52 +1157,6 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="0">
|
<item row="10" column="0">
|
||||||
<widget class="QLabel" name="label_19">
|
|
||||||
<property name="text">
|
|
||||||
<string>Errors</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="0">
|
|
||||||
<widget class="QLabel" name="UAVTalkErrorsLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>UAVTalk Errors</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="1">
|
|
||||||
<widget class="QLineEdit" name="UAVTalkErrors">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QLineEdit {
|
|
||||||
border: none;
|
|
||||||
border-radius: 1px;
|
|
||||||
padding: 0 8px;
|
|
||||||
background: rgba(0, 0, 0, 16);
|
|
||||||
/* background: transparent; */
|
|
||||||
/* selection-background-color: darkgray;*/
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="0">
|
|
||||||
<widget class="QLabel" name="ResetsLabel">
|
<widget class="QLabel" name="ResetsLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Resets</string>
|
<string>Resets</string>
|
||||||
@ -751,8 +1166,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="1">
|
<item row="10" column="1">
|
||||||
<widget class="QLineEdit" name="Resets">
|
<widget class="QLineEdit" name="Resets">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
@ -763,7 +1190,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -777,7 +1204,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="0">
|
<item row="10" column="2">
|
||||||
<widget class="QLabel" name="DroppedLabel">
|
<widget class="QLabel" name="DroppedLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Dropped</string>
|
<string>Dropped</string>
|
||||||
@ -787,8 +1214,14 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="1">
|
<item row="10" column="3">
|
||||||
<widget class="QLineEdit" name="Dropped">
|
<widget class="QLineEdit" name="Dropped">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>101</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
@ -799,7 +1232,7 @@
|
|||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
padding: 0 8px;
|
padding: 0 4px;
|
||||||
background: rgba(0, 0, 0, 16);
|
background: rgba(0, 0, 0, 16);
|
||||||
/* background: transparent; */
|
/* background: transparent; */
|
||||||
/* selection-background-color: darkgray;*/
|
/* selection-background-color: darkgray;*/
|
||||||
@ -813,114 +1246,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="0">
|
|
||||||
<widget class="QLabel" name="TXRateLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>TX Rate (B/s)</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="14" column="1">
|
|
||||||
<widget class="QLineEdit" name="TXRate">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QLineEdit {
|
|
||||||
border: none;
|
|
||||||
border-radius: 1px;
|
|
||||||
padding: 0 8px;
|
|
||||||
background: rgba(0, 0, 0, 16);
|
|
||||||
/* background: transparent; */
|
|
||||||
/* selection-background-color: darkgray;*/
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="15" column="0">
|
|
||||||
<widget class="QLabel" name="RXRateLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>RX Rate (B/s)</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="15" column="1">
|
|
||||||
<widget class="QLineEdit" name="RXRate">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QLineEdit {
|
|
||||||
border: none;
|
|
||||||
border-radius: 1px;
|
|
||||||
padding: 0 8px;
|
|
||||||
background: rgba(0, 0, 0, 16);
|
|
||||||
/* background: transparent; */
|
|
||||||
/* selection-background-color: darkgray;*/
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1">
|
|
||||||
<widget class="QLineEdit" name="DeviceID">
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<weight>75</weight>
|
|
||||||
<bold>true</bold>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QLineEdit {
|
|
||||||
border: none;
|
|
||||||
border-radius: 1px;
|
|
||||||
padding: 0 8px;
|
|
||||||
background: rgba(0, 0, 0, 16);
|
|
||||||
/* background: transparent; */
|
|
||||||
/* selection-background-color: darkgray;*/
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<property name="frame">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="label_20">
|
|
||||||
<property name="text">
|
|
||||||
<string>Device ID</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -929,6 +1254,12 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<weight>75</weight>
|
<weight>75</weight>
|
||||||
|
@ -0,0 +1,48 @@
|
|||||||
|
% GCSCONTROL
|
||||||
|
% This class allows the user to send 4-axis stick commands to OpenPilot
|
||||||
|
% GCS.
|
||||||
|
%
|
||||||
|
% Create class by
|
||||||
|
% control = GCSControl
|
||||||
|
%
|
||||||
|
% Open connection by
|
||||||
|
% control.connect('01.23.45.67', 89)
|
||||||
|
% where the first value is the IP address of the computer running GCS and
|
||||||
|
% the second value is the port on which GCS is listening.
|
||||||
|
%
|
||||||
|
% Send command by
|
||||||
|
% control.command(pitch, yaw, roll, throttle)
|
||||||
|
% where all variables are between [-1,1]
|
||||||
|
%
|
||||||
|
% Close connection by
|
||||||
|
% control.close()
|
||||||
|
|
||||||
|
classdef GCSControl < handle
|
||||||
|
|
||||||
|
properties
|
||||||
|
udpObj;
|
||||||
|
isConnected=false;
|
||||||
|
end
|
||||||
|
|
||||||
|
methods
|
||||||
|
function obj=GCSControl()
|
||||||
|
obj.isConnected = false;
|
||||||
|
end
|
||||||
|
function obj=connect(obj,rhost,rport)
|
||||||
|
obj.udpObj = udp(rhost,rport);
|
||||||
|
fopen(obj.udpObj);
|
||||||
|
obj.isConnected = true;
|
||||||
|
end
|
||||||
|
function obj=command(obj,pitch,yaw,roll,throttle)
|
||||||
|
if(obj.isConnected)
|
||||||
|
fwrite(obj.udpObj,[42,pitch,yaw,roll,throttle,36],'double')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
function obj=close(obj)
|
||||||
|
if(obj.isConnected)
|
||||||
|
fclose(obj.udpObj);
|
||||||
|
obj.isConnected = false;
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -2,6 +2,7 @@ TEMPLATE = lib
|
|||||||
TARGET = GCSControl
|
TARGET = GCSControl
|
||||||
QT += svg
|
QT += svg
|
||||||
QT += opengl
|
QT += opengl
|
||||||
|
QT += network
|
||||||
|
|
||||||
include(../../openpilotgcsplugin.pri)
|
include(../../openpilotgcsplugin.pri)
|
||||||
include(../../plugins/coreplugin/coreplugin.pri)
|
include(../../plugins/coreplugin/coreplugin.pri)
|
||||||
|
@ -41,8 +41,21 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBoxUDPControl">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>UDP Control</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="checkBoxArmed">
|
<widget class="QCheckBox" name="checkBoxArmed">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Armed</string>
|
<string>Armed</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -44,6 +44,10 @@ GCSControlGadget::GCSControlGadget(QString classId, GCSControlGadgetWidget *widg
|
|||||||
|
|
||||||
manualControlCommandUpdated(getManualControlCommand());
|
manualControlCommandUpdated(getManualControlCommand());
|
||||||
|
|
||||||
|
control_sock = new QUdpSocket(this);
|
||||||
|
|
||||||
|
connect(control_sock,SIGNAL(readyRead()),this,SLOT(readUDPCommand()));
|
||||||
|
|
||||||
joystickTime.start();
|
joystickTime.start();
|
||||||
GCSControlPlugin *pl = dynamic_cast<GCSControlPlugin*>(plugin);
|
GCSControlPlugin *pl = dynamic_cast<GCSControlPlugin*>(plugin);
|
||||||
connect(pl->sdlGamepad,SIGNAL(gamepads(quint8)),this,SLOT(gamepads(quint8)));
|
connect(pl->sdlGamepad,SIGNAL(gamepads(quint8)),this,SLOT(gamepads(quint8)));
|
||||||
@ -67,6 +71,12 @@ void GCSControlGadget::loadConfiguration(IUAVGadgetConfiguration* config)
|
|||||||
yawChannel = ql.at(2);
|
yawChannel = ql.at(2);
|
||||||
throttleChannel = ql.at(3);
|
throttleChannel = ql.at(3);
|
||||||
|
|
||||||
|
// if(control_sock->isOpen())
|
||||||
|
// control_sock->close();
|
||||||
|
control_sock->bind(GCSControlConfig->getUDPControlHost(), GCSControlConfig->getUDPControlPort(),QUdpSocket::ShareAddress);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
controlsMode = GCSControlConfig->getControlsMode();
|
controlsMode = GCSControlConfig->getControlsMode();
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
@ -174,7 +184,8 @@ void GCSControlGadget::sticksChangedLocally(double leftX, double leftY, double r
|
|||||||
}
|
}
|
||||||
|
|
||||||
//if we are not in local gcs control mode, ignore the joystick input
|
//if we are not in local gcs control mode, ignore the joystick input
|
||||||
if (((GCSControlGadgetWidget *)m_widget)->getGCSControl()==false)return;
|
if (((GCSControlGadgetWidget *)m_widget)->getGCSControl()==false || ((GCSControlGadgetWidget *)m_widget)->getUDPControl())
|
||||||
|
return;
|
||||||
|
|
||||||
if((newThrottle != oldThrottle) || (newPitch != oldPitch) || (newYaw != oldYaw) || (newRoll != oldRoll)) {
|
if((newThrottle != oldThrottle) || (newPitch != oldPitch) || (newYaw != oldYaw) || (newRoll != oldRoll)) {
|
||||||
if (buttonRollControl==0)obj->getField("Roll")->setDouble(newRoll);
|
if (buttonRollControl==0)obj->getField("Roll")->setDouble(newRoll);
|
||||||
@ -191,6 +202,93 @@ void GCSControlGadget::gamepads(quint8 count)
|
|||||||
// sdlGamepad.setTickRate(JOYSTICK_UPDATE_RATE);
|
// sdlGamepad.setTickRate(JOYSTICK_UPDATE_RATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GCSControlGadget::readUDPCommand()
|
||||||
|
{
|
||||||
|
double pitch, yaw, roll, throttle;
|
||||||
|
while (control_sock->hasPendingDatagrams()) {
|
||||||
|
QByteArray datagram;
|
||||||
|
datagram.resize(control_sock->pendingDatagramSize());
|
||||||
|
control_sock->readDatagram(datagram.data(), datagram.size());
|
||||||
|
QDataStream readData(datagram);
|
||||||
|
bool badPack = false;
|
||||||
|
int state = 0;
|
||||||
|
while(!readData.atEnd() && !badPack)
|
||||||
|
{
|
||||||
|
double buffer;
|
||||||
|
readData >> buffer;
|
||||||
|
switch(state)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
if(buffer == 42){
|
||||||
|
state = 1;
|
||||||
|
}else{
|
||||||
|
state = 0;
|
||||||
|
badPack = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
pitch = buffer;
|
||||||
|
state = 2;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
yaw = buffer;
|
||||||
|
state = 3;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
roll = buffer;
|
||||||
|
state = 4;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
throttle = buffer;
|
||||||
|
state = 5;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
if(buffer != 36 || !readData.atEnd())
|
||||||
|
badPack=true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(!badPack && ((GCSControlGadgetWidget *)m_widget)->getUDPControl())
|
||||||
|
{
|
||||||
|
ManualControlCommand * obj = getManualControlCommand();
|
||||||
|
bool update = false;
|
||||||
|
|
||||||
|
if(pitch != obj->getField("Pitch")->getDouble()){
|
||||||
|
obj->getField("Pitch")->setDouble(constrain(pitch));
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
if(yaw != obj->getField("Yaw")->getDouble()){
|
||||||
|
obj->getField("Yaw")->setDouble(constrain(yaw));
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
if(roll != obj->getField("Roll")->getDouble()){
|
||||||
|
obj->getField("Roll")->setDouble(constrain(roll));
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
if(throttle != obj->getField("Throttle")->getDouble()){
|
||||||
|
obj->getField("Throttle")->setDouble(constrain(throttle));
|
||||||
|
update = true;
|
||||||
|
}
|
||||||
|
if(update)
|
||||||
|
obj->updated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
qDebug() << "Pitch: " << pitch << " Yaw: " << yaw << " Roll: " << roll << " Throttle: " << throttle;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
double GCSControlGadget::constrain(double value)
|
||||||
|
{
|
||||||
|
if(value < -1)
|
||||||
|
return -1;
|
||||||
|
if(value > 1)
|
||||||
|
return 1;
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
void GCSControlGadget::buttonState(ButtonNumber number, bool pressed)
|
void GCSControlGadget::buttonState(ButtonNumber number, bool pressed)
|
||||||
{
|
{
|
||||||
int state;
|
int state;
|
||||||
@ -200,6 +298,7 @@ void GCSControlGadget::buttonState(ButtonNumber number, bool pressed)
|
|||||||
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();
|
||||||
UAVDataObject* obj = dynamic_cast<UAVDataObject*>( objManager->getObject(QString("ManualControlCommand")) );
|
UAVDataObject* obj = dynamic_cast<UAVDataObject*>( objManager->getObject(QString("ManualControlCommand")) );
|
||||||
bool currentCGSControl = ((GCSControlGadgetWidget *)m_widget)->getGCSControl();
|
bool currentCGSControl = ((GCSControlGadgetWidget *)m_widget)->getGCSControl();
|
||||||
|
bool currentUDPControl = ((GCSControlGadgetWidget *)m_widget)->getUDPControl();
|
||||||
|
|
||||||
switch (buttonSettings[number].ActionID)
|
switch (buttonSettings[number].ActionID)
|
||||||
{
|
{
|
||||||
@ -267,6 +366,11 @@ void GCSControlGadget::buttonState(ButtonNumber number, bool pressed)
|
|||||||
//Toggle the GCS Control checkbox, its built in signalling will handle the update to OP
|
//Toggle the GCS Control checkbox, its built in signalling will handle the update to OP
|
||||||
((GCSControlGadgetWidget *)m_widget)->setGCSControl(!currentCGSControl);
|
((GCSControlGadgetWidget *)m_widget)->setGCSControl(!currentCGSControl);
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 3: //UDP Control
|
||||||
|
if(currentCGSControl)
|
||||||
|
((GCSControlGadgetWidget *)m_widget)->setUDPControl(!currentUDPControl);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,9 @@
|
|||||||
#include "sdlgamepad/sdlgamepad.h"
|
#include "sdlgamepad/sdlgamepad.h"
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include "gcscontrolplugin.h"
|
#include "gcscontrolplugin.h"
|
||||||
|
#include <QUdpSocket>
|
||||||
|
#include <QHostAddress>
|
||||||
|
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
class IUAVGadget;
|
class IUAVGadget;
|
||||||
@ -59,6 +62,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ManualControlCommand* getManualControlCommand();
|
ManualControlCommand* getManualControlCommand();
|
||||||
|
double constrain(double value);
|
||||||
QTime joystickTime;
|
QTime joystickTime;
|
||||||
QWidget *m_widget;
|
QWidget *m_widget;
|
||||||
QList<int> m_context;
|
QList<int> m_context;
|
||||||
@ -72,6 +76,8 @@ private:
|
|||||||
double bound(double input);
|
double bound(double input);
|
||||||
double wrap(double input);
|
double wrap(double input);
|
||||||
bool channelReverse[8];
|
bool channelReverse[8];
|
||||||
|
QUdpSocket *control_sock;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sticksChangedRemotely(double leftX, double leftY, double rightX, double rightY);
|
void sticksChangedRemotely(double leftX, double leftY, double rightX, double rightY);
|
||||||
@ -79,6 +85,7 @@ signals:
|
|||||||
protected slots:
|
protected slots:
|
||||||
void manualControlCommandUpdated(UAVObject *);
|
void manualControlCommandUpdated(UAVObject *);
|
||||||
void sticksChangedLocally(double leftX, double leftY, double rightX, double rightY);
|
void sticksChangedLocally(double leftX, double leftY, double rightX, double rightY);
|
||||||
|
void readUDPCommand();
|
||||||
|
|
||||||
// signals from joystick
|
// signals from joystick
|
||||||
void gamepads(quint8 count);
|
void gamepads(quint8 count);
|
||||||
|
@ -54,6 +54,9 @@ GCSControlGadgetConfiguration::GCSControlGadgetConfiguration(QString classId, QS
|
|||||||
yawChannel = qSettings->value("yawChannel").toInt();
|
yawChannel = qSettings->value("yawChannel").toInt();
|
||||||
throttleChannel = qSettings->value("throttleChannel").toInt();
|
throttleChannel = qSettings->value("throttleChannel").toInt();
|
||||||
|
|
||||||
|
udp_port = qSettings->value("controlPortUDP").toUInt();
|
||||||
|
udp_host = QHostAddress(qSettings->value("controlHostUDP").toString());
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<8;i++)
|
for (i=0;i<8;i++)
|
||||||
{
|
{
|
||||||
@ -66,6 +69,21 @@ GCSControlGadgetConfiguration::GCSControlGadgetConfiguration(QString classId, QS
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GCSControlGadgetConfiguration::setUDPControlSettings(int port, QString host)
|
||||||
|
{
|
||||||
|
udp_port = port;
|
||||||
|
udp_host = QHostAddress(host);
|
||||||
|
}
|
||||||
|
|
||||||
|
int GCSControlGadgetConfiguration::getUDPControlPort()
|
||||||
|
{
|
||||||
|
return udp_port;
|
||||||
|
}
|
||||||
|
QHostAddress GCSControlGadgetConfiguration::getUDPControlHost()
|
||||||
|
{
|
||||||
|
return udp_host;
|
||||||
|
}
|
||||||
|
|
||||||
void GCSControlGadgetConfiguration::setRPYTchannels(int roll, int pitch, int yaw, int throttle) {
|
void GCSControlGadgetConfiguration::setRPYTchannels(int roll, int pitch, int yaw, int throttle) {
|
||||||
rollChannel = roll;
|
rollChannel = roll;
|
||||||
pitchChannel = pitch;
|
pitchChannel = pitch;
|
||||||
@ -102,6 +120,9 @@ IUAVGadgetConfiguration *GCSControlGadgetConfiguration::clone()
|
|||||||
m->yawChannel = yawChannel;
|
m->yawChannel = yawChannel;
|
||||||
m->throttleChannel = throttleChannel;
|
m->throttleChannel = throttleChannel;
|
||||||
|
|
||||||
|
m->udp_host = udp_host;
|
||||||
|
m->udp_port = udp_port;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<8;i++)
|
for (i=0;i<8;i++)
|
||||||
{
|
{
|
||||||
@ -126,6 +147,9 @@ void GCSControlGadgetConfiguration::saveConfig(QSettings* settings) const {
|
|||||||
settings->setValue("yawChannel", yawChannel);
|
settings->setValue("yawChannel", yawChannel);
|
||||||
settings->setValue("throttleChannel", throttleChannel);
|
settings->setValue("throttleChannel", throttleChannel);
|
||||||
|
|
||||||
|
settings->setValue("controlPortUDP",QString::number(udp_port));
|
||||||
|
settings->setValue("controlHostUDP",udp_host.toString());
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<8;i++)
|
for (i=0;i<8;i++)
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
#define GCSCONTROLGADGETCONFIGURATION_H
|
#define GCSCONTROLGADGETCONFIGURATION_H
|
||||||
|
|
||||||
#include <coreplugin/iuavgadgetconfiguration.h>
|
#include <coreplugin/iuavgadgetconfiguration.h>
|
||||||
|
#include <QtNetwork/QHostAddress>
|
||||||
|
|
||||||
typedef struct{
|
typedef struct{
|
||||||
int ActionID;
|
int ActionID;
|
||||||
@ -36,6 +37,11 @@ typedef struct{
|
|||||||
double Amount;
|
double Amount;
|
||||||
}buttonSettingsStruct;
|
}buttonSettingsStruct;
|
||||||
|
|
||||||
|
typedef struct{
|
||||||
|
int port;
|
||||||
|
QHostAddress address;
|
||||||
|
}portSettingsStruct;
|
||||||
|
|
||||||
|
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
|
|
||||||
@ -49,6 +55,9 @@ class GCSControlGadgetConfiguration : public IUAVGadgetConfiguration
|
|||||||
|
|
||||||
void setControlsMode(int mode) { controlsMode = mode; }
|
void setControlsMode(int mode) { controlsMode = mode; }
|
||||||
void setRPYTchannels(int roll, int pitch, int yaw, int throttle);
|
void setRPYTchannels(int roll, int pitch, int yaw, int throttle);
|
||||||
|
void setUDPControlSettings(int port, QString host);
|
||||||
|
int getUDPControlPort();
|
||||||
|
QHostAddress getUDPControlHost();
|
||||||
int getControlsMode() { return controlsMode; }
|
int getControlsMode() { return controlsMode; }
|
||||||
QList<int> getChannelsMapping();
|
QList<int> getChannelsMapping();
|
||||||
QList<bool> getChannelsReverse();
|
QList<bool> getChannelsReverse();
|
||||||
@ -72,6 +81,8 @@ class GCSControlGadgetConfiguration : public IUAVGadgetConfiguration
|
|||||||
int throttleChannel;
|
int throttleChannel;
|
||||||
buttonSettingsStruct buttonSettings[8];
|
buttonSettingsStruct buttonSettings[8];
|
||||||
bool channelReverse[8];
|
bool channelReverse[8];
|
||||||
|
int udp_port;
|
||||||
|
QHostAddress udp_host;
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -137,7 +137,7 @@ QWidget *GCSControlGadgetOptionsPage::createPage(QWidget *parent)
|
|||||||
options_page->buttonFunction4 << options_page->buttonFunction5 <<
|
options_page->buttonFunction4 << options_page->buttonFunction5 <<
|
||||||
options_page->buttonFunction6 << options_page->buttonFunction7;
|
options_page->buttonFunction6 << options_page->buttonFunction7;
|
||||||
QStringList buttonOptions;
|
QStringList buttonOptions;
|
||||||
buttonOptions <<"-" << "Roll" << "Pitch" << "Yaw" << "Throttle" << "Armed" << "GCS Control" ;
|
buttonOptions <<"-" << "Roll" << "Pitch" << "Yaw" << "Throttle" << "Armed" << "GCS Control"; //added UDP control to action list
|
||||||
foreach (QComboBox* qb, buttonFunctionList) {
|
foreach (QComboBox* qb, buttonFunctionList) {
|
||||||
qb->addItems(buttonOptions);
|
qb->addItems(buttonOptions);
|
||||||
}
|
}
|
||||||
@ -187,6 +187,9 @@ QWidget *GCSControlGadgetOptionsPage::createPage(QWidget *parent)
|
|||||||
|
|
||||||
//updateButtonFunction();
|
//updateButtonFunction();
|
||||||
|
|
||||||
|
options_page->udp_host->setText(m_config->getUDPControlHost().toString());
|
||||||
|
options_page->udp_port->setText(QString::number(m_config->getUDPControlPort()));
|
||||||
|
|
||||||
|
|
||||||
// Controls mode are from 1 to 4.
|
// Controls mode are from 1 to 4.
|
||||||
if (m_config->getControlsMode()>0 && m_config->getControlsMode() < 5)
|
if (m_config->getControlsMode()>0 && m_config->getControlsMode() < 5)
|
||||||
@ -262,6 +265,9 @@ void GCSControlGadgetOptionsPage::apply()
|
|||||||
}
|
}
|
||||||
m_config->setRPYTchannels(roll,pitch,yaw,throttle);
|
m_config->setRPYTchannels(roll,pitch,yaw,throttle);
|
||||||
|
|
||||||
|
m_config->setUDPControlSettings(options_page->udp_port->text().toInt(),options_page->udp_host->text());
|
||||||
|
|
||||||
|
|
||||||
int j;
|
int j;
|
||||||
for (j=0;j<8;j++)
|
for (j=0;j<8;j++)
|
||||||
{
|
{
|
||||||
@ -271,6 +277,7 @@ void GCSControlGadgetOptionsPage::apply()
|
|||||||
m_config->setChannelReverse(j,chRevList.at(j)->isChecked());
|
m_config->setChannelReverse(j,chRevList.at(j)->isChecked());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCSControlGadgetOptionsPage::finish()
|
void GCSControlGadgetOptionsPage::finish()
|
||||||
@ -369,7 +376,7 @@ void GCSControlGadgetOptionsPage::updateButtonAction(int controlID)
|
|||||||
if (buttonActionList.at(i)->currentText().compare("Toggles")==0)
|
if (buttonActionList.at(i)->currentText().compare("Toggles")==0)
|
||||||
{
|
{
|
||||||
disconnect(buttonFunctionList.at(i),SIGNAL(currentIndexChanged(int)),this,SLOT(updateButtonFunction()));
|
disconnect(buttonFunctionList.at(i),SIGNAL(currentIndexChanged(int)),this,SLOT(updateButtonFunction()));
|
||||||
buttonOptions <<"-" << "Armed" << "GCS Control" ;
|
buttonOptions <<"-" << "Armed" << "GCS Control" << "UDP Control";
|
||||||
buttonFunctionList.at(i)->clear();
|
buttonFunctionList.at(i)->clear();
|
||||||
buttonFunctionList.at(i)->insertItems(-1,buttonOptions);
|
buttonFunctionList.at(i)->insertItems(-1,buttonOptions);
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="UDPSetup">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
@ -1011,6 +1011,66 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="UDPSetup_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>UDP Setup</string>
|
||||||
|
</attribute>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>20</x>
|
||||||
|
<y>20</y>
|
||||||
|
<width>301</width>
|
||||||
|
<height>71</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>UDP Port Configuration</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_7">
|
||||||
|
<property name="text">
|
||||||
|
<string>Host:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="udp_host">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>120</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>127.0.0.1</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_6">
|
||||||
|
<property name="text">
|
||||||
|
<string>Port:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="udp_port">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>2323</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -34,6 +34,7 @@
|
|||||||
#include <QtGui/QVBoxLayout>
|
#include <QtGui/QVBoxLayout>
|
||||||
#include <QtGui/QPushButton>
|
#include <QtGui/QPushButton>
|
||||||
|
|
||||||
|
|
||||||
#include "uavobject.h"
|
#include "uavobject.h"
|
||||||
#include "uavobjectmanager.h"
|
#include "uavobjectmanager.h"
|
||||||
#include "manualcontrolcommand.h"
|
#include "manualcontrolcommand.h"
|
||||||
@ -64,9 +65,14 @@ GCSControlGadgetWidget::GCSControlGadgetWidget(QWidget *parent) : QLabel(parent)
|
|||||||
connect(m_gcscontrol->checkBoxArmed, SIGNAL(stateChanged(int)), this, SLOT(toggleArmed(int)));
|
connect(m_gcscontrol->checkBoxArmed, SIGNAL(stateChanged(int)), this, SLOT(toggleArmed(int)));
|
||||||
connect(m_gcscontrol->comboBoxFlightMode, SIGNAL(currentIndexChanged(int)), this, SLOT(selectFlightMode(int)));
|
connect(m_gcscontrol->comboBoxFlightMode, SIGNAL(currentIndexChanged(int)), this, SLOT(selectFlightMode(int)));
|
||||||
|
|
||||||
|
connect(m_gcscontrol->checkBoxUDPControl, SIGNAL(stateChanged(int)),this,SLOT(toggleUDPControl(int))); //UDP control checkbox
|
||||||
|
|
||||||
// Connect object updated event from UAVObject to also update check boxes and dropdown
|
// Connect object updated event from UAVObject to also update check boxes and dropdown
|
||||||
connect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(mccChanged(UAVObject*)));
|
connect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(mccChanged(UAVObject*)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
leftX = 0;
|
leftX = 0;
|
||||||
leftY = 0;
|
leftY = 0;
|
||||||
rightX = 0;
|
rightX = 0;
|
||||||
@ -122,11 +128,14 @@ void GCSControlGadgetWidget::toggleControl(int state)
|
|||||||
UAVObject::SetGcsTelemetryAcked(mdata, false);
|
UAVObject::SetGcsTelemetryAcked(mdata, false);
|
||||||
UAVObject::SetGcsTelemetryUpdateMode(mdata, UAVObject::UPDATEMODE_ONCHANGE);
|
UAVObject::SetGcsTelemetryUpdateMode(mdata, UAVObject::UPDATEMODE_ONCHANGE);
|
||||||
mdata.gcsTelemetryUpdatePeriod = 100;
|
mdata.gcsTelemetryUpdatePeriod = 100;
|
||||||
|
m_gcscontrol->checkBoxUDPControl->setEnabled(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mdata = mccInitialData;
|
mdata = mccInitialData;
|
||||||
|
toggleUDPControl(false);
|
||||||
|
m_gcscontrol->checkBoxUDPControl->setEnabled(false);
|
||||||
}
|
}
|
||||||
obj->setMetadata(mdata);
|
obj->setMetadata(mdata);
|
||||||
}
|
}
|
||||||
@ -152,6 +161,16 @@ void GCSControlGadgetWidget::mccChanged(UAVObject * obj)
|
|||||||
m_gcscontrol->checkBoxArmed->setChecked(flightStatus->getField("Armed")->getValue() == "Armed");
|
m_gcscontrol->checkBoxArmed->setChecked(flightStatus->getField("Armed")->getValue() == "Armed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GCSControlGadgetWidget::toggleUDPControl(int state)
|
||||||
|
{
|
||||||
|
if(state)
|
||||||
|
{
|
||||||
|
setUDPControl(true);
|
||||||
|
}else{
|
||||||
|
setUDPControl(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Called when the flight mode drop down is changed and sets the ManualControlCommand->FlightMode accordingly
|
\brief Called when the flight mode drop down is changed and sets the ManualControlCommand->FlightMode accordingly
|
||||||
*/
|
*/
|
||||||
@ -168,11 +187,21 @@ void GCSControlGadgetWidget::selectFlightMode(int state)
|
|||||||
void GCSControlGadgetWidget::setGCSControl(bool newState)
|
void GCSControlGadgetWidget::setGCSControl(bool newState)
|
||||||
{
|
{
|
||||||
m_gcscontrol->checkBoxGcsControl->setChecked(newState);
|
m_gcscontrol->checkBoxGcsControl->setChecked(newState);
|
||||||
};
|
}
|
||||||
bool GCSControlGadgetWidget::getGCSControl(void)
|
bool GCSControlGadgetWidget::getGCSControl(void)
|
||||||
{
|
{
|
||||||
return m_gcscontrol->checkBoxGcsControl->isChecked();
|
return m_gcscontrol->checkBoxGcsControl->isChecked();
|
||||||
};
|
}
|
||||||
|
|
||||||
|
void GCSControlGadgetWidget::setUDPControl(bool newState)
|
||||||
|
{
|
||||||
|
m_gcscontrol->checkBoxUDPControl->setChecked(newState);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GCSControlGadgetWidget::getUDPControl(void)
|
||||||
|
{
|
||||||
|
return m_gcscontrol->checkBoxUDPControl->isChecked();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -31,6 +31,8 @@
|
|||||||
#include <QtGui/QLabel>
|
#include <QtGui/QLabel>
|
||||||
#include "manualcontrolcommand.h"
|
#include "manualcontrolcommand.h"
|
||||||
|
|
||||||
|
#define UDP_PORT 2323
|
||||||
|
|
||||||
class Ui_GCSControl;
|
class Ui_GCSControl;
|
||||||
|
|
||||||
class GCSControlGadgetWidget : public QLabel
|
class GCSControlGadgetWidget : public QLabel
|
||||||
@ -42,6 +44,8 @@ public:
|
|||||||
~GCSControlGadgetWidget();
|
~GCSControlGadgetWidget();
|
||||||
void setGCSControl(bool newState);
|
void setGCSControl(bool newState);
|
||||||
bool getGCSControl(void);
|
bool getGCSControl(void);
|
||||||
|
void setUDPControl(bool newState);
|
||||||
|
bool getUDPControl(void);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void sticksChanged(double leftX, double leftY, double rightX, double rightY);
|
void sticksChanged(double leftX, double leftY, double rightX, double rightY);
|
||||||
@ -59,6 +63,7 @@ protected slots:
|
|||||||
void toggleArmed(int state);
|
void toggleArmed(int state);
|
||||||
void selectFlightMode(int state);
|
void selectFlightMode(int state);
|
||||||
void mccChanged(UAVObject *);
|
void mccChanged(UAVObject *);
|
||||||
|
void toggleUDPControl(int state);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui_GCSControl *m_gcscontrol;
|
Ui_GCSControl *m_gcscontrol;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<object name="GCSReceiver" singleinstance="true" settings="false">
|
<object name="GCSReceiver" singleinstance="true" settings="false">
|
||||||
<description>A receiver channel group carried over the telemetry link.</description>
|
<description>A receiver channel group carried over the telemetry link.</description>
|
||||||
<field name="Channel" units="us" type="uint16" elements="8"/>
|
<field name="Channel" units="us" type="uint16" elements="8"/>
|
||||||
<access gcs="readwrite" flight="readonly"/>
|
<access gcs="readwrite" flight="readwrite"/>
|
||||||
<telemetrygcs acked="false" updatemode="onchange" period="0"/>
|
<telemetrygcs acked="false" updatemode="onchange" period="0"/>
|
||||||
<telemetryflight acked="false" updatemode="onchange" period="0"/>
|
<telemetryflight acked="false" updatemode="onchange" period="0"/>
|
||||||
<logging updatemode="manual" period="0"/>
|
<logging updatemode="manual" period="0"/>
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
<object name="PipXSettings" singleinstance="true" settings="true">
|
<object name="PipXSettings" singleinstance="true" settings="true">
|
||||||
<description>PipXtreme configurations options.</description>
|
<description>PipXtreme configurations options.</description>
|
||||||
<field name="PairID" units="" type="uint32" elements="1" defaultvalue="0"/>
|
<field name="PairID" units="" type="uint32" elements="1" defaultvalue="0"/>
|
||||||
<field name="TelemetryConfig" units="function" type="enum" elements="1" options="Disabled,Serial,UAVTalk,Debug" defaultvalue="UAVTalk"/>
|
<field name="TelemetryConfig" units="function" type="enum" elements="1" options="Disabled,Serial,UAVTalk,GCS,Debug" defaultvalue="UAVTalk"/>
|
||||||
<field name="TelemetrySpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
<field name="TelemetrySpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
||||||
<field name="FlexiConfig" units="function" type="enum" elements="1" options="Disabled,Serial,UAVTalk,PPM_In,PPM_Out,RSSI,Debug" defaultvalue="Disabled"/>
|
<field name="FlexiConfig" units="function" type="enum" elements="1" options="Disabled,Serial,UAVTalk,GCS,PPM_In,PPM_Out,RSSI,Debug" defaultvalue="Disabled"/>
|
||||||
<field name="FlexiSpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
<field name="FlexiSpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
||||||
<field name="VCPConfig" units="function" type="enum" elements="1" options="Disabled,Serial,Debug" defaultvalue="Disabled"/>
|
<field name="VCPConfig" units="function" type="enum" elements="1" options="Disabled,Serial,Debug" defaultvalue="Disabled"/>
|
||||||
<field name="VCPSpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
<field name="VCPSpeed" units="bps" type="enum" elements="1" options="2400,4800,9600,19200,38400,57600,115200" defaultvalue="57600"/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user