From 81ea0b9232c21ba86755f3f6ba04ada3f9a5251d Mon Sep 17 00:00:00 2001 From: a*morale Date: Tue, 14 Jul 2015 23:11:44 +0200 Subject: [PATCH] LP-5 Fix revert issue --- .../src/plugins/config/configgadgetwidget.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp b/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp index 3a10d3eaa..f717283f3 100644 --- a/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp +++ b/ground/openpilotgcs/src/plugins/config/configgadgetwidget.cpp @@ -184,22 +184,21 @@ void ConfigGadgetWidget::onAutopilotConnect() UAVObjectUtilManager *utilMngr = pm->getObject(); if (utilMngr) { int board = utilMngr->getBoardModel(); - if ((board & 0xff00) == 1024) { + if ((board & 0xff00) == 0x0400) { // CopterControl family QWidget *qwd = new ConfigCCAttitudeWidget(this); stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd); - qwd = new ConfigCCHWWidget(this); stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd); } else if ((board & 0xff00) == 0x0900) { // Revolution family QWidget *qwd = new ConfigRevoWidget(this); stackWidget->replaceTab(ConfigGadgetWidget::sensors, qwd); - qwd = new ConfigRevoHWWidget(this); - } else if (board == 0x0905) { + if (board == 0x0905) { qwd = new ConfigRevoNanoHWWidget(this); - stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd); + } + stackWidget->replaceTab(ConfigGadgetWidget::hardware, qwd); } else { // Unknown board qDebug() << "Unknown board " << board;