1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +01:00

LP-245 config: review comments

This commit is contained in:
Philippe Renon 2016-09-23 09:59:00 +02:00
parent 4000303482
commit 5fdc75250f
3 changed files with 11 additions and 9 deletions

View File

@ -196,6 +196,7 @@ void ConfigGadgetWidget::onAutopilotConnect()
// Check what Board type we are talking to, and if necessary, remove/add tabs in the config gadget
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
UAVObjectUtilManager *utilMngr = pm->getObject<UAVObjectUtilManager>();
if (utilMngr) {
int board = utilMngr->getBoardModel();
if ((board & 0xff00) == 0x0400) {
@ -253,6 +254,7 @@ void ConfigGadgetWidget::onOPLinkConnect()
// qDebug() << "ConfigGadgetWidget::onOPLinkConnect";
ConfigTaskWidget *widget = new ConfigOPLinkWidget(this);
widget->bind();
stackWidget->replaceTab(ConfigGadgetWidget::OPLink, widget);
}
@ -262,6 +264,7 @@ void ConfigGadgetWidget::onOPLinkDisconnect()
// qDebug() << "ConfigGadgetWidget::onOPLinkDisconnect";
QWidget *widget = new DefaultConfigWidget(this, tr("OPLink Configuration"));
stackWidget->replaceTab(ConfigGadgetWidget::OPLink, widget);
}

View File

@ -1,13 +1,13 @@
/**
******************************************************************************
*
* @file defaultattitudewidget.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @file defaultconfigwidget.cpp
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
* @addtogroup GCSPlugins GCS Plugins
* @{
* @addtogroup ConfigPlugin Config Plugin
* @{
* @brief Placeholder for attitude panel until board is connected.
* @brief Placeholder for config widget until board connected.
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
@ -28,10 +28,9 @@
#include "ui_defaultconfig.h"
DefaultConfigWidget::DefaultConfigWidget(QWidget *parent, QString title) :
QWidget(parent),
ui(new Ui_defaultconfig)
DefaultConfigWidget::DefaultConfigWidget(QWidget *parent, QString title) : QWidget(parent)
{
ui = new Ui_defaultconfig();
ui->setupUi(this);
ui->tabWidget->setTabText(0, title);

View File

@ -1,13 +1,13 @@
/**
******************************************************************************
*
* @file defaultccattitudewidget.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* @file defaultconfigwidget.h
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015.
* @addtogroup GCSPlugins GCS Plugins
* @{
* @addtogroup ConfigPlugin Config Plugin
* @{
* @brief Placeholder for attitude settings widget until board connected.
* @brief Placeholder for config widget until board connected.
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify