From d612f67b8d909a0071fd28e574bbf4f306f878f5 Mon Sep 17 00:00:00 2001 From: Chris Pember Date: Sat, 14 Jul 2012 11:50:17 -0700 Subject: [PATCH] more GUI changes and reorganizations --- .../openpilotgcs/src/plugins/config/input.ui | 556 +++++++++--------- .../openpilotgcs/src/plugins/config/output.ui | 448 ++++++++++++-- .../src/plugins/config/outputchannelform.cpp | 34 +- .../src/plugins/config/outputchannelform.ui | 326 ++-------- .../src/plugins/config/stabilization.ui | 14 +- .../openpilotgcs/src/plugins/config/txpid.ui | 8 +- 6 files changed, 758 insertions(+), 628 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/input.ui b/ground/openpilotgcs/src/plugins/config/input.ui index ae1c13963..0533913fa 100644 --- a/ground/openpilotgcs/src/plugins/config/input.ui +++ b/ground/openpilotgcs/src/plugins/config/input.ui @@ -6,17 +6,14 @@ 0 0 - 692 - 958 + 693 + 882 Form - - - 12 - + @@ -26,7 +23,7 @@ RC Input - + 12 @@ -49,183 +46,191 @@ 0 0 - 638 - 801 + 639 + 721 - - - - 0 + + + + + 0 + 0 + - - - - - - - - - Qt::Vertical - - - QSizePolicy::Preferred - - - - 20 - 5 - - - - - - - - - - Roll/Pitch/Yaw stick deadband - - - - - - - Stick deadband in percents of full range (0-10), zero to disable - - - 1 - - - 10.000000000000000 - - - 0.100000000000000 - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - QSizePolicy::Preferred - - - - 20 - 5 - - - - - - - - Start Configuration Wizard - + + + + + + + + Start Configuration Wizard + + + + + + + Run Calibration + + + + + + + + + + + + + + + + 0 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Preferred + + + + 20 + 5 + + + + + + + + + + Roll/Pitch/Yaw stick deadband + + + + + + + Stick deadband in percents of full range (0-10), zero to disable + + + 1 + + + 10.000000000000000 + + + 0.100000000000000 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + - - - - - Run Calibration - + + + + + + + 0 + 0 + + + + + 0 + 90 + + + + TextLabel + + + true + + + + + + + + + + + + + + + + + + + Back + + + + + + + Next + + + + + + + Cancel + + + + + + - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - 0 - 0 - - - - - 0 - 90 - - - - TextLabel - - - true - - - - - - - - - - - - - - - - - - - Back - - - - - - - Next - - - - - - - Cancel - - - - - - - + + + @@ -261,8 +266,8 @@ 0 0 - 638 - 801 + 624 + 776 @@ -712,7 +717,7 @@ margin:1px; Arming Settings - + 12 @@ -735,100 +740,109 @@ margin:1px; 0 0 - 638 - 801 + 639 + 721 - - - - - - 50 - false - - - - Arm airframe using throttle off and: - - - - - - - Qt::StrongFocus - - - Indicate the control used for arming the airframe, in addition to setting the throttle to its minimum position. In other terms "Throttle Off". - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - Arming timeout: - - - - - - - Qt::StrongFocus - - - After the time indicated here, the frame go back to disarmed state. - - - 64 - - - - - - - seconds. - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Airframe disarm is done by throttle off and opposite of above combination. + + + Arming Settings + + + + + + + + 50 + false + + + + Arm airframe using throttle off and: + + + + + + + Qt::StrongFocus + + + Indicate the control used for arming the airframe, in addition to setting the throttle to its minimum position. In other terms "Throttle Off". + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Arming timeout: + + + + + + + Qt::StrongFocus + + + After the time indicated here, the frame go back to disarmed state. + + + 64 + + + + + + + seconds. + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Airframe disarm is done by throttle off and opposite of above combination. + + + + @@ -1001,8 +1015,6 @@ border-radius: 4; fmsSsPos3Yaw tabWidget deadband - configurationWizard - runCalibration graphicsView wzBack wzNext diff --git a/ground/openpilotgcs/src/plugins/config/output.ui b/ground/openpilotgcs/src/plugins/config/output.ui index b2e8c9ca2..dc12661b6 100644 --- a/ground/openpilotgcs/src/plugins/config/output.ui +++ b/ground/openpilotgcs/src/plugins/config/output.ui @@ -6,17 +6,14 @@ 0 0 - 664 - 791 + 866 + 937 Form - - - 12 - + @@ -32,7 +29,7 @@ Output - + 12 @@ -55,13 +52,25 @@ 0 0 - 610 - 634 + 812 + 776 - + + + + 0 + 0 + + + + + 0 + 78 + + @@ -430,57 +439,376 @@ Leave at 50Hz for fixed wing. - - - 0 + + + - - QLayout::SetNoConstraint - - - - - - - - - - 519 - 0 - - - - Motors spin at neutral output when armed and throttle below zero (be careful) - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - - 20 - 458 - - - + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 14 + 20 + + + + + + + + + 0 + 0 + + + + + 22 + 0 + + + + + 75 + false + true + + + + Qt::LeftToRight + + + 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; +font:bold; +margin:1px; + + + # + + + Qt::AlignCenter + + + 0 + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 1 + 20 + + + + + + + + + 0 + 0 + + + + + 104 + 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; +font:bold; +margin:1px; + + + Assignment + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 61 + 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; +font:bold; +margin:1px; + + + Min + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 185 + 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; +font:bold; +margin:1px; + + + Neutral (slowest for motor) + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + QSizePolicy::Fixed + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 50 + 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; +font:bold; +margin:1px; + + + Max + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 40 + 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; +font:bold; +margin:1px; + + + Rev. + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 40 + 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; +font:bold; +margin:1px; + + + Link + + + Qt::AlignCenter + + + + + + + + + -1 + + + QLayout::SetDefaultConstraint + + + + + + + + + + 519 + 0 + + + + Motors spin at neutral output when armed and throttle below zero (be careful) + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 542 + + + + + + diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp index f2d039edb..813c32a94 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.cpp @@ -35,23 +35,23 @@ OutputChannelForm::OutputChannelForm(const int index, QWidget *parent, const boo m_inChannelTest(false) { ui.setupUi(this); - if(!showLegend) - { - // Remove legend - QGridLayout *grid_layout = dynamic_cast(layout()); - Q_ASSERT(grid_layout); - for (int col = 0; col < grid_layout->columnCount(); col++) - { // remove every item in first row - QLayoutItem *item = grid_layout->itemAtPosition(0, col); - if (!item) continue; - // get widget from layout item - QWidget *legend_widget = item->widget(); - if (!legend_widget) continue; - // delete widget - grid_layout->removeWidget(legend_widget); - delete legend_widget; - } - } +// if(!showLegend) +// { +// // Remove legend +// QGridLayout *grid_layout = dynamic_cast(layout()); +// Q_ASSERT(grid_layout); +// for (int col = 0; col < grid_layout->columnCount(); col++) +// { // remove every item in first row +// QLayoutItem *item = grid_layout->itemAtPosition(0, col); +// if (!item) continue; +// // get widget from layout item +// QWidget *legend_widget = item->widget(); +// if (!legend_widget) continue; +// // delete widget +// grid_layout->removeWidget(legend_widget); +// delete legend_widget; +// } +// } // The convention for OP is Channel 1 to Channel 10. ui.actuatorNumber->setText(QString("%1:").arg(m_index+1)); diff --git a/ground/openpilotgcs/src/plugins/config/outputchannelform.ui b/ground/openpilotgcs/src/plugins/config/outputchannelform.ui index 9c2c62f47..512e1bc4b 100644 --- a/ground/openpilotgcs/src/plugins/config/outputchannelform.ui +++ b/ground/openpilotgcs/src/plugins/config/outputchannelform.ui @@ -6,7 +6,7 @@ 0 0 - 813 + 645 58 @@ -20,53 +20,61 @@ 1 - - + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 5 + 20 + + + + + + - + 0 0 + + + 0 + 0 + + + + Qt::StrongFocus + + + 9999 + + + Qt::Horizontal + + + + + + + Qt::StrongFocus + - Current value of slider. + Maximum PWM value, beware of not overdriving your servo. - - 0000 + + 9999 - - - - - 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; -font:bold; -margin:1px; - - - Link - - - Qt::AlignCenter - - - - + @@ -89,42 +97,6 @@ margin:1px; - - - - 0 - 0 - - - - - 75 - false - true - - - - Qt::LeftToRight - - - 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; -font:bold; -margin:1px; - - - # - - - Qt::AlignCenter - - - 0 - - - - @@ -152,7 +124,7 @@ margin:1px; - + Qt::StrongFocus @@ -165,7 +137,7 @@ margin:1px; - + @@ -187,67 +159,7 @@ margin:1px; - - - - - 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; -font:bold; -margin:1px; - - - Neutral (slowest for motor) - - - Qt::AlignCenter - - - - - - - - 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; -font:bold; -margin:1px; - - - Assignment - - - Qt::AlignCenter - - - - + Qt::Horizontal @@ -263,67 +175,7 @@ margin:1px; - - - - - 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; -font:bold; -margin:1px; - - - Min - - - Qt::AlignCenter - - - - - - - - 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; -font:bold; -margin:1px; - - - Max - - - Qt::AlignCenter - - - - + @@ -345,87 +197,19 @@ margin:1px; - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 5 - 20 - - - - - - + + 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; -font:bold; -margin:1px; + + Current value of slider. - Rev. - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 0 - 0 - - - - Qt::StrongFocus - - - 9999 - - - Qt::Horizontal - - - - - - - Qt::StrongFocus - - - Maximum PWM value, beware of not overdriving your servo. - - - 9999 + 0000 diff --git a/ground/openpilotgcs/src/plugins/config/stabilization.ui b/ground/openpilotgcs/src/plugins/config/stabilization.ui index 8e8fd71cd..f51be1530 100755 --- a/ground/openpilotgcs/src/plugins/config/stabilization.ui +++ b/ground/openpilotgcs/src/plugins/config/stabilization.ui @@ -6,7 +6,7 @@ 0 0 - 786 + 757 993 @@ -509,7 +509,7 @@ 0 0 - 732 + 703 832 @@ -10587,7 +10587,7 @@ Attitude 0 0 - 717 + 470 923 @@ -23648,7 +23648,7 @@ border-radius: 5; 0 - 79 + 75 @@ -24199,7 +24199,7 @@ border-radius: 5; - 300 + 150 20 @@ -24315,14 +24315,14 @@ Useful if you have accidentally changed some settings. - + 0 0 - 136 + 300 20 diff --git a/ground/openpilotgcs/src/plugins/config/txpid.ui b/ground/openpilotgcs/src/plugins/config/txpid.ui index c10a16c6a..94ee7ae17 100644 --- a/ground/openpilotgcs/src/plugins/config/txpid.ui +++ b/ground/openpilotgcs/src/plugins/config/txpid.ui @@ -50,7 +50,7 @@ 0 0 654 - 671 + 659 @@ -583,6 +583,12 @@ margin:1px; 0 + + + 0 + 75 + + 16777215