diff --git a/files/images/px4/menu/cogwheels.png b/files/images/px4/menu/cogwheels.png
new file mode 100644
index 0000000000000000000000000000000000000000..8079ca4169aca274ab014c0fb82f51f1c387b33b
Binary files /dev/null and b/files/images/px4/menu/cogwheels.png differ
diff --git a/files/images/px4/menu/firmware_upgrade.png b/files/images/px4/menu/firmware_upgrade.png
new file mode 100644
index 0000000000000000000000000000000000000000..83397753376d9e9234d6cd1698d1d1c74bf5ea65
Binary files /dev/null and b/files/images/px4/menu/firmware_upgrade.png differ
diff --git a/files/images/px4/menu/plane.png b/files/images/px4/menu/plane.png
new file mode 100644
index 0000000000000000000000000000000000000000..e22d605a6bbaebf2e8dffd5e48f94657b52f099f
Binary files /dev/null and b/files/images/px4/menu/plane.png differ
diff --git a/files/images/px4/menu/remote.png b/files/images/px4/menu/remote.png
new file mode 100644
index 0000000000000000000000000000000000000000..9785678d79b080bd0efd500790336f2ef2b2dd4e
Binary files /dev/null and b/files/images/px4/menu/remote.png differ
diff --git a/files/images/px4/menu/sensors.png b/files/images/px4/menu/sensors.png
new file mode 100644
index 0000000000000000000000000000000000000000..6c972fae53bf98facc3d8a9f2ce1ee5cc40be6d3
Binary files /dev/null and b/files/images/px4/menu/sensors.png differ
diff --git a/files/styles/style-dark.css b/files/styles/style-dark.css
index db24be25841fda72f1c7f2d8a8c3976606f8479f..fc653de73763752fd1b6cc222d7df51c02b1c74e 100644
--- a/files/styles/style-dark.css
+++ b/files/styles/style-dark.css
@@ -358,6 +358,16 @@ QPushButton, QToolButton {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #777, stop: 1 #333);
}
+QPushButton#advancedMenuButton, QPushButton#airframeMenuButton, QPushButton#firmwareMenuButton,
+QPushButton#generalMenuButton, QPushButton#rcMenuButton, QPushButton#sensorMenuButton {
+ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #333, stop: 1 #111);
+ border-radius: 5px;
+ min-height: 64px;
+ max-height: 64px;
+ min-width: 80px;
+ border: 1px solid #000000;
+}
+
QPushButton#planePushButton, QPushButton#flyingWingPushButton, QPushButton#quadXPushButton,
QPushButton#quadPlusPushButton, QPushButton#hexaXPushButton, QPushButton#hexaPlusPushButton,
QPushButton#octoXPushButton, QPushButton#octoPlusPushButton, QPushButton#hPushButton {
@@ -392,6 +402,12 @@ QWidget#containerWidget {
border: 2px solid #CCCCCC;
}
+QWidget#navBarWidget {
+ background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #404040, stop:1 #727272);
+ border-radius: 0px;
+ border: 1px solid #222222;
+}
+
QPushButton#connectButton, QPushButton#controlButton {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #73D95D, stop: 1 #18A154);
}
diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc
index d19abb7000212c6f8015805e99fa0d87da8f29b7..0e5a041496de986b3453658309a1e47e4a1a1134 100644
--- a/qgroundcontrol.qrc
+++ b/qgroundcontrol.qrc
@@ -175,6 +175,11 @@
files/images/px4/calibration/accel_z-.png
files/images/px4/calibration/accel_y+.png
files/images/px4/calibration/mag_calibration_figure8.png
+ files/images/px4/menu/sensors.png
+ files/images/px4/menu/firmware_upgrade.png
+ files/images/px4/menu/plane.png
+ files/images/px4/menu/remote.png
+ files/images/px4/menu/cogwheels.png
files/styles/Vera.ttf
diff --git a/src/ui/QGCConfigView.cc b/src/ui/QGCConfigView.cc
index fbf5bb8abe183f88cb46403c4f8130f63880706d..8e647cd804581a2a070eea615278043ace8a0800 100644
--- a/src/ui/QGCConfigView.cc
+++ b/src/ui/QGCConfigView.cc
@@ -18,8 +18,14 @@ QGCConfigView::QGCConfigView(QWidget *parent) :
// The config screens are required for firmware uploading
if (MainWindow::instance()->getCustomMode() == MainWindow::CUSTOM_MODE_PX4) {
+
+ ui->gridLayout->removeWidget(ui->waitingLabel);
+ ui->waitingLabel->setVisible(false);
+ delete ui->waitingLabel;
+
config = new QGCPX4VehicleConfig();
ui->gridLayout->addWidget(config);
+
} else {
//don't show a configuration widget if no vehicle is connected
//show a placeholder informational widget instead
@@ -37,23 +43,28 @@ void QGCConfigView::activeUASChanged(UASInterface* uas)
if (mav == uas)
return;
- //remove all child widgets since they could contain stale data
- //for example, when we switch from one PX4 UAS to another UAS
- foreach (QObject* obj, ui->gridLayout->children()) {
- QWidget* w = dynamic_cast(obj);
- if (w) {
- if (obj != ui->waitingLabel) {
- ui->gridLayout->removeWidget(w);
- delete obj;
- }
- }
- }
+ int type = -1;
+ if (mav)
+ type = mav->getAutopilotType();
mav = uas;
- if (NULL != mav) {
+ if (NULL != uas && type != uas->getAutopilotType()) {
+
ui->gridLayout->removeWidget(ui->waitingLabel);
ui->waitingLabel->setVisible(false);
+ //remove all child widgets since they could contain stale data
+ //for example, when we switch from one PX4 UAS to another UAS
+ foreach (QObject* obj, ui->gridLayout->children()) {
+ QWidget* w = dynamic_cast(obj);
+ if (w) {
+ if (obj != ui->waitingLabel) {
+ ui->gridLayout->removeWidget(w);
+ delete obj;
+ }
+ }
+ }
+
int autopilotType = mav->getAutopilotType();
switch (autopilotType) {
case MAV_AUTOPILOT_PX4:
diff --git a/src/ui/QGCConfigView.ui b/src/ui/QGCConfigView.ui
index cd4b9c98fed1366a88f5be3452f1e8b9dc6d4c84..38ce1ce7774ec6d80a70474fdb36eace4d5cdb90 100644
--- a/src/ui/QGCConfigView.ui
+++ b/src/ui/QGCConfigView.ui
@@ -14,6 +14,9 @@
Form
+
+ 0
+
-
diff --git a/src/ui/QGCPX4VehicleConfig.cc b/src/ui/QGCPX4VehicleConfig.cc
index 740b14714990e4412c3ffa7a4b876f34d370f14e..4cdf530311654dd63b7b86962da9da9678a15a56 100644
--- a/src/ui/QGCPX4VehicleConfig.cc
+++ b/src/ui/QGCPX4VehicleConfig.cc
@@ -89,6 +89,7 @@ QGCPX4VehicleConfig::QGCPX4VehicleConfig(QWidget *parent) :
ui->airframeMenuButton->setEnabled(false);
ui->sensorMenuButton->setEnabled(false);
ui->rcMenuButton->setEnabled(false);
+ ui->generalMenuButton->hide();
px4AirframeConfig = new QGCPX4AirframeConfig(this);
ui->airframeLayout->addWidget(px4AirframeConfig);
@@ -554,7 +555,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
// Load tabs for general configuration
foreach (QString dir,generaldir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
{
- QPushButton *button = new QPushButton(ui->leftNavScrollAreaWidgetContents);
+ QPushButton *button = new QPushButton(this);
connect(button,SIGNAL(clicked()),this,SLOT(menuButtonClicked()));
ui->navBarLayout->insertWidget(2,button);
button->setMinimumHeight(75);
@@ -598,7 +599,7 @@ void QGCPX4VehicleConfig::loadQgcConfig(bool primary)
// Load additional tabs for vehicle specific configuration
foreach (QString dir,vehicledir.entryList(QDir::Dirs | QDir::NoDotAndDotDot))
{
- QPushButton *button = new QPushButton(ui->leftNavScrollAreaWidgetContents);
+ QPushButton *button = new QPushButton(this);
connect(button,SIGNAL(clicked()),this,SLOT(menuButtonClicked()));
ui->navBarLayout->insertWidget(2,button);
diff --git a/src/ui/QGCPX4VehicleConfig.ui b/src/ui/QGCPX4VehicleConfig.ui
index 458e0046e77e08f67f1cc5f487ba194029888af5..9793992d73332e988e1386baccede50546421361 100644
--- a/src/ui/QGCPX4VehicleConfig.ui
+++ b/src/ui/QGCPX4VehicleConfig.ui
@@ -19,134 +19,187 @@
Form
-
+
+
+ 0
+
-
-
-
-
- 135
- 0
-
-
-
-
- 135
- 16777215
-
-
-
- true
-
-
-
-
- 0
- 0
- 133
- 886
-
+
+
+
+ 0
-
-
-
-
-
- QLayout::SetMinAndMaxSize
-
-
-
-
-
- Firmware
+
-
+
+
+ QLayout::SetMinAndMaxSize
+
+
+ 12
+
+
+ 12
+
+
+ 24
+
+
+ 12
+
+
-
+
+
+ Firmware
Upgrade
-
-
-
- -
-
-
-
- 100
- 75
-
-
-
-
- 16777215
- 16777215
-
-
-
- RC
+
+
+
+ :/files/images/px4/menu/firmware_upgrade.png:/files/images/px4/menu/firmware_upgrade.png
+
+
+
+ 64
+ 64
+
+
+
+
+ -
+
+
+
+ 100
+ 75
+
+
+
+
+ 16777215
+ 16777215
+
+
+
+ Radio
Calibration
-
-
-
- -
-
-
-
- 100
- 75
-
-
-
- Sensor
+
+
+
+ :/files/images/px4/menu/remote.png:/files/images/px4/menu/remote.png
+
+
+
+ 64
+ 64
+
+
+
+
+ -
+
+
+
+ 100
+ 75
+
+
+
+ Sensor
Calibration
-
-
-
- -
-
-
- Airframe
+
+
+
+ :/files/images/px4/menu/sensors.png:/files/images/px4/menu/sensors.png
+
+
+
+ 64
+ 64
+
+
+
+
+ -
+
+
+ Airframe
Config
-
-
-
- -
-
-
-
- 100
- 75
-
-
-
- General
+
+
+
+ :/files/images/px4/menu/plane.png:/files/images/px4/menu/plane.png
+
+
+
+ 64
+ 64
+
+
+
+
+ -
+
+
+
+ 100
+ 75
+
+
+
+ General
Config
-
-
-
- -
-
-
-
- 100
- 75
-
-
-
- Advanced
+
+
+
+ :/files/images/px4/menu/cogwheels.png:/files/images/px4/menu/cogwheels.png
+
+
+
+ 64
+ 64
+
+
+
+
+ -
+
+
+
+ 100
+ 75
+
+
+
+ Advanced
Config
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
+
+
+
+ :/files/images/px4/menu/cogwheels.png:/files/images/px4/menu/cogwheels.png
+
+
+
+ 64
+ 64
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
-
@@ -154,7 +207,7 @@ Config
-
- 2
+ 5
@@ -1123,8 +1176,8 @@ Config
0
0
- 597
- 740
+ 571
+ 764
@@ -1253,6 +1306,8 @@ Config
1
-
+
+
+