diff --git a/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.cpp b/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.cpp index 29604b6e7..5a7c5618c 100644 --- a/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.cpp @@ -71,6 +71,8 @@ ConfigPipXtremeWidget::ConfigPipXtremeWidget(QWidget *parent) : ConfigTaskWidget addUAVObjectToWidgetRelation("PipXStatus", "MinFrequency", m_pipx->MinFrequency); addUAVObjectToWidgetRelation("PipXStatus", "MaxFrequency", m_pipx->MaxFrequency); 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", "Retries", m_pipx->Retries); addUAVObjectToWidgetRelation("PipXStatus", "Errors", m_pipx->Errors); @@ -81,6 +83,7 @@ ConfigPipXtremeWidget::ConfigPipXtremeWidget(QWidget *parent) : ConfigTaskWidget addUAVObjectToWidgetRelation("PipXStatus", "TXRate", m_pipx->TXRate); // 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->PairSelect2, SIGNAL(toggled(bool)), this, SLOT(pair2Toggled(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 QScrollArea *scroll = new QScrollArea; scroll->setWidget(m_pipx->frame_3); + scroll->setWidgetResizable(true); m_pipx->verticalLayout_3->addWidget(scroll); // Request and update of the setting object. @@ -280,6 +284,8 @@ void ConfigPipXtremeWidget::disconnected() void ConfigPipXtremeWidget::pairIDToggled(bool checked, quint8 idx) { + qDebug() << QString("Pairid toggled %1").arg(checked); + qDebug() << QString("idx %1").arg(idx); if(checked) { PipXStatus *pipxStatus = PipXStatus::GetInstance(getObjectManager()); @@ -287,9 +293,20 @@ void ConfigPipXtremeWidget::pairIDToggled(bool checked, quint8 idx) if (pipxStatus && pipxSettings) { - quint32 pairID = pipxStatus->getPairIDs(idx); - if (pairID) - pipxSettings->setPairID(pairID); + if (idx == 4) + { + qDebug() << QString("PairID 0"); + pipxSettings->setPairID(0); + } + else + { + quint32 pairID = pipxStatus->getPairIDs(idx); + if (pairID) + { + qDebug() << QString("Pairid %1").arg(pairID); + pipxSettings->setPairID(pairID); + } + } } } } @@ -314,6 +331,11 @@ void ConfigPipXtremeWidget::pair4Toggled(bool checked) pairIDToggled(checked, 3); } +void ConfigPipXtremeWidget::pairBToggled(bool checked) +{ + pairIDToggled(checked, 4); +} + /** @} @} diff --git a/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.h b/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.h index b702326e8..28db67b74 100644 --- a/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.h +++ b/ground/openpilotgcs/src/plugins/config/configpipxtremewidget.h @@ -63,6 +63,7 @@ private slots: void pair2Toggled(bool checked); void pair3Toggled(bool checked); void pair4Toggled(bool checked); + void pairBToggled(bool checked); }; #endif // CONFIGTXPIDWIDGET_H diff --git a/ground/openpilotgcs/src/plugins/config/pipxtreme.ui b/ground/openpilotgcs/src/plugins/config/pipxtreme.ui index 5dc9e372a..0a50d90da 100644 --- a/ground/openpilotgcs/src/plugins/config/pipxtreme.ui +++ b/ground/openpilotgcs/src/plugins/config/pipxtreme.ui @@ -81,7 +81,7 @@ 40 - 20 + 5 @@ -144,7 +144,7 @@ - 0 + Broadcast false @@ -326,14 +326,14 @@ - Firmware Version + Firmware Ver. Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + @@ -369,7 +369,7 @@ - + @@ -417,6 +417,16 @@ + + + + Device ID + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + @@ -443,7 +453,17 @@ - + + + + Pair ID + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + @@ -470,16 +490,6 @@ - - - Pair ID - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - Min Frequency @@ -489,7 +499,7 @@ - + @@ -530,7 +540,7 @@ - + Max Frequency @@ -540,7 +550,7 @@ - + @@ -581,7 +591,7 @@ - + Freq. Step Size @@ -591,7 +601,7 @@ - + @@ -632,6 +642,195 @@ + + + + Freq. Band + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + + 16777215 + 16777215 + + + + + 75 + true + + + + The current frequency band + + + QLineEdit { + border: none; + border-radius: 1px; + padding: 0 8px; + background: rgba(0, 0, 0, 16); +/* background: transparent; */ +/* selection-background-color: darkgray;*/ +} + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + true + + + + + + + RSSI + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 75 + true + + + + QLineEdit { + border: none; + border-radius: 1px; + padding: 0 8px; + background: rgba(0, 0, 0, 16); +/* background: transparent; */ +/* selection-background-color: darkgray;*/ +} + + + true + + + + + + + Rx AFC + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 75 + true + + + + QLineEdit { + border: none; + border-radius: 1px; + padding: 0 8px; + background: rgba(0, 0, 0, 16); +/* background: transparent; */ +/* selection-background-color: darkgray;*/ +} + + + true + + + + + + + TX Rate (B/s) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 75 + true + + + + QLineEdit { + border: none; + border-radius: 1px; + padding: 0 8px; + background: rgba(0, 0, 0, 16); +/* background: transparent; */ +/* selection-background-color: darkgray;*/ +} + + + false + + + true + + + + + + + RX Rate (B/s) + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 75 + true + + + + QLineEdit { + border: none; + border-radius: 1px; + padding: 0 8px; + background: rgba(0, 0, 0, 16); +/* background: transparent; */ +/* selection-background-color: darkgray;*/ +} + + + false + + + true + + + @@ -683,76 +882,17 @@ - - + + - Rx AFC + Errors Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - 75 - true - - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ -} - - - true - - - - - - - Retries - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 75 - true - - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ -} - - - false - - - true - - - - + @@ -778,17 +918,43 @@ - - + + - Errors + Retries Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - + + + + + 75 + true + + + + QLineEdit { + border: none; + border-radius: 1px; + padding: 0 8px; + background: rgba(0, 0, 0, 16); +/* background: transparent; */ +/* selection-background-color: darkgray;*/ +} + + + false + + + true + + + + UAVTalk Errors @@ -798,7 +964,7 @@ - + @@ -824,7 +990,7 @@ - + Resets @@ -834,7 +1000,7 @@ - + @@ -860,7 +1026,7 @@ - + Dropped @@ -870,7 +1036,7 @@ - + @@ -886,78 +1052,6 @@ background: rgba(0, 0, 0, 16); /* background: transparent; */ /* selection-background-color: darkgray;*/ -} - - - false - - - true - - - - - - - TX Rate (B/s) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 75 - true - - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ -} - - - false - - - true - - - - - - - RX Rate (B/s) - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 75 - true - - - - QLineEdit { - border: none; - border-radius: 1px; - padding: 0 8px; - background: rgba(0, 0, 0, 16); -/* background: transparent; */ -/* selection-background-color: darkgray;*/ }