diff --git a/ground/openpilotgcs/src/plugins/config/airframe.ui b/ground/openpilotgcs/src/plugins/config/airframe.ui index 7f61b0fae..1224614b5 100644 --- a/ground/openpilotgcs/src/plugins/config/airframe.ui +++ b/ground/openpilotgcs/src/plugins/config/airframe.ui @@ -38,7 +38,7 @@ - Aircraft type: + Vehicle type: @@ -1409,7 +1409,7 @@ margin:1px; - Airplane type: + Vehicle type: diff --git a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp index 62dc10f6d..1e8efef1f 100644 --- a/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configinputwidget.cpp @@ -56,18 +56,19 @@ ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent) addApplySaveButtons(m_config->saveRCInputToRAM,m_config->saveRCInputToSD); + //Generate the rows of buttons in the input channel form GUI unsigned int index=0; foreach (QString name, manualSettingsObj->getField("ChannelNumber")->getElementNames()) { Q_ASSERT(index < ManualControlSettings::CHANNELGROUPS_NUMELEM); - inputChannelForm * inp=new inputChannelForm(this,index==0); - m_config->channelSettings->layout()->addWidget(inp); - inp->setName(name); - addUAVObjectToWidgetRelation("ManualControlSettings","ChannelGroups",inp->ui->channelGroup,index); - addUAVObjectToWidgetRelation("ManualControlSettings","ChannelNumber",inp->ui->channelNumber,index); - addUAVObjectToWidgetRelation("ManualControlSettings","ChannelMin",inp->ui->channelMin,index); - addUAVObjectToWidgetRelation("ManualControlSettings","ChannelNeutral",inp->ui->channelNeutral,index); - addUAVObjectToWidgetRelation("ManualControlSettings","ChannelMax",inp->ui->channelMax,index); + inputChannelForm * inpForm=new inputChannelForm(this,index==0); + m_config->channelSettings->layout()->addWidget(inpForm); //Add the row to the UI + inpForm->setName(name); + addUAVObjectToWidgetRelation("ManualControlSettings","ChannelGroups",inpForm->ui->channelGroup,index); + addUAVObjectToWidgetRelation("ManualControlSettings","ChannelNumber",inpForm->ui->channelNumber,index); + addUAVObjectToWidgetRelation("ManualControlSettings","ChannelMin",inpForm->ui->channelMin,index); + addUAVObjectToWidgetRelation("ManualControlSettings","ChannelNeutral",inpForm->ui->channelNeutral,index); + addUAVObjectToWidgetRelation("ManualControlSettings","ChannelMax",inpForm->ui->channelMax,index); ++index; } diff --git a/ground/openpilotgcs/src/plugins/config/inputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/inputchannelform.cpp index 095575eb1..7561e111f 100644 --- a/ground/openpilotgcs/src/plugins/config/inputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/inputchannelform.cpp @@ -8,6 +8,8 @@ inputChannelForm::inputChannelForm(QWidget *parent,bool showlegend) : ui(new Ui::inputChannelForm) { ui->setupUi(this); + + //The first time through the loop, keep the legend. All other times, delete it. if(!showlegend) { layout()->removeWidget(ui->legend0); diff --git a/ground/openpilotgcs/src/plugins/config/inputchannelform.ui b/ground/openpilotgcs/src/plugins/config/inputchannelform.ui index e609a51ca..b53bbb6bf 100644 --- a/ground/openpilotgcs/src/plugins/config/inputchannelform.ui +++ b/ground/openpilotgcs/src/plugins/config/inputchannelform.ui @@ -37,7 +37,7 @@ 80 - 0 + 25 @@ -53,6 +53,12 @@ 0 + + + 0 + 25 + + 100 @@ -63,6 +69,12 @@ + + + 0 + 25 + + QAbstractSpinBox::NoButtons @@ -76,6 +88,12 @@ + + + 0 + 25 + + QAbstractSpinBox::NoButtons @@ -93,11 +111,17 @@ true - + 0 0 + + + 0 + 26 + + 75 @@ -126,11 +150,17 @@ font:bold; true - + 0 0 + + + 0 + 26 + + 75 @@ -159,11 +189,17 @@ font:bold; true - + 0 0 + + + 0 + 26 + + 75 @@ -192,11 +228,17 @@ font:bold; true - + 0 0 + + + 0 + 26 + + 75 @@ -227,6 +269,12 @@ font:bold; 0 + + + 0 + 22 + + Qt::Horizontal @@ -240,6 +288,12 @@ font:bold; 0 + + + 0 + 25 + + 80 @@ -269,6 +323,12 @@ font:bold; false + + + 0 + 20 + + Rev @@ -277,14 +337,14 @@ font:bold; - + 0 0 - 30 + 35 0 @@ -331,50 +391,23 @@ font:bold; - - - - true - - - - 0 - 0 - - - - - 75 - false - true - - - - background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); -color: rgb(255, 255, 255); -border-radius: 5; -margin:5px; -font:bold; - - - Number - - - Qt::AlignCenter - - - true - + 0 0 + + + 0 + 26 + + 75 @@ -397,6 +430,45 @@ font:bold; + + + + true + + + + 0 + 0 + + + + + 0 + 26 + + + + + 75 + false + true + + + + background-color: qlineargradient(spread:reflect, x1:0.507, y1:0, x2:0.507, y2:0.772, stop:0.208955 rgba(74, 74, 74, 255), stop:0.78607 rgba(36, 36, 36, 255)); +color: rgb(255, 255, 255); +border-radius: 5; +margin:5px; +font:bold; + + + Number + + + Qt::AlignCenter + + +