mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
LP-525 Added GCS HW page for SPRacing F3 EVO
This commit is contained in:
parent
2f1e7cd72d
commit
657499c0d6
113
ground/gcs/src/plugins/config/commonhwsettingswidget.cpp
Normal file
113
ground/gcs/src/plugins/config/commonhwsettingswidget.cpp
Normal file
@ -0,0 +1,113 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file commonhwsettingswidget.cpp
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2017.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
* @{
|
||||
* @brief Common hardware configuration panel
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "commonhwsettingswidget.h"
|
||||
|
||||
#include "ui_commonhwsettingswidget.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
CommonHWSettingsWidget::CommonHWSettingsWidget(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
m_ui = new Ui_CommonHWSettingsWidget();
|
||||
m_ui->setupUi(this);
|
||||
|
||||
setFeatures(0);
|
||||
|
||||
/* Relay signals from private members */
|
||||
connect(m_ui->cbUSBHID, SIGNAL(currentIndexChanged(int)), this, SIGNAL(USBHIDFunctionChanged(int)));
|
||||
connect(m_ui->cbUSBVCP, SIGNAL(currentIndexChanged(int)), this, SIGNAL(USBVCPFunctionChanged(int)));
|
||||
}
|
||||
|
||||
CommonHWSettingsWidget::~CommonHWSettingsWidget()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void CommonHWSettingsWidget::registerWidgets(ConfigTaskWidget &ct)
|
||||
{
|
||||
// addAutoBindings();
|
||||
|
||||
// ct.addUAVObject("HwSettings");
|
||||
|
||||
ct.addWidgetBinding("HwSettings", "USB_HIDPort", m_ui->cbUSBHID);
|
||||
ct.addWidgetBinding("HwSettings", "USB_VCPPort", m_ui->cbUSBVCP);
|
||||
|
||||
ct.addWidgetBinding("HwSettings", "TelemetrySpeed", m_ui->cbTelemetrySpeed);
|
||||
ct.addWidgetBinding("HwSettings", "GPSSpeed", m_ui->cbGPSSpeed);
|
||||
ct.addWidgetBinding("HwSettings", "DebugConsoleSpeed", m_ui->cbDebugConsoleSpeed);
|
||||
ct.addWidgetBinding("HwSettings", "SBusMode", m_ui->cbSBUSMode);
|
||||
ct.addWidgetBinding("HwSettings", "DSMxBind", m_ui->cbDSMxBind, 0, 1, true);
|
||||
|
||||
ct.addWidgetBinding("GPSSettings", "DataProtocol", m_ui->cbGPSProtocol);
|
||||
}
|
||||
|
||||
|
||||
void CommonHWSettingsWidget::setFeatures(quint32 features)
|
||||
{
|
||||
bool flag = features != 0;
|
||||
|
||||
setVisible(flag);
|
||||
|
||||
flag = (features & F_USB) != 0;
|
||||
|
||||
m_ui->lbUSBHID->setVisible(flag);
|
||||
m_ui->cbUSBHID->setVisible(flag);
|
||||
m_ui->lbUSBVCP->setVisible(flag);
|
||||
m_ui->cbUSBVCP->setVisible(flag);
|
||||
|
||||
flag = (features & F_SBUS) != 0;
|
||||
|
||||
m_ui->lbSBUSMode->setVisible(flag);
|
||||
m_ui->cbSBUSMode->setVisible(flag);
|
||||
|
||||
flag = (features & F_DSM) != 0;
|
||||
|
||||
m_ui->lbDSMxBind->setVisible(flag);
|
||||
m_ui->cbDSMxBind->setVisible(flag);
|
||||
|
||||
flag = (features & F_TELEMETRY) != 0;
|
||||
|
||||
m_ui->lbTelemetrySpeed->setVisible(flag);
|
||||
m_ui->cbTelemetrySpeed->setVisible(flag);
|
||||
|
||||
flag = (features & F_DEBUGCONSOLE) != 0;
|
||||
|
||||
m_ui->lbDebugConsoleSpeed->setVisible(flag);
|
||||
m_ui->cbDebugConsoleSpeed->setVisible(flag);
|
||||
|
||||
flag = (features & F_GPS) != 0;
|
||||
|
||||
m_ui->lbGPSSpeed->setVisible(flag);
|
||||
m_ui->cbGPSSpeed->setVisible(flag);
|
||||
m_ui->lbGPSProtocol->setVisible(flag);
|
||||
m_ui->cbGPSProtocol->setVisible(flag);
|
||||
}
|
||||
|
||||
QComboBox *CommonHWSettingsWidget::USBVCPComboBox()
|
||||
{
|
||||
return m_ui->cbUSBVCP;
|
||||
}
|
62
ground/gcs/src/plugins/config/commonhwsettingswidget.h
Normal file
62
ground/gcs/src/plugins/config/commonhwsettingswidget.h
Normal file
@ -0,0 +1,62 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file commonhwsettingswidget.h
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2017.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
* @{
|
||||
* @brief Common hardware configuration panel
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef COMMONHWSETTINGSWIDGET_H
|
||||
#define COMMONHWSETTINGSWIDGET_H
|
||||
|
||||
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
||||
|
||||
class Ui_CommonHWSettingsWidget;
|
||||
|
||||
class CommonHWSettingsWidget : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static const quint32 F_USB = (1 << 0);
|
||||
static const quint32 F_SBUS = (1 << 1);
|
||||
static const quint32 F_DSM = (1 << 2);
|
||||
static const quint32 F_TELEMETRY = (1 << 3);
|
||||
static const quint32 F_DEBUGCONSOLE = (1 << 4);
|
||||
static const quint32 F_GPS = (1 << 5);
|
||||
|
||||
CommonHWSettingsWidget(QWidget *parent = 0);
|
||||
virtual ~CommonHWSettingsWidget();
|
||||
|
||||
void registerWidgets(ConfigTaskWidget &ct);
|
||||
|
||||
void setFeatures(quint32 features);
|
||||
|
||||
QComboBox *USBVCPComboBox();
|
||||
|
||||
signals:
|
||||
void USBHIDFunctionChanged(int index);
|
||||
void USBVCPFunctionChanged(int index);
|
||||
|
||||
private:
|
||||
Ui_CommonHWSettingsWidget *m_ui;
|
||||
};
|
||||
|
||||
#endif // COMMONHWSETTINGSWIDGET_H
|
307
ground/gcs/src/plugins/config/commonhwsettingswidget.ui
Normal file
307
ground/gcs/src/plugins/config/commonhwsettingswidget.ui
Normal file
@ -0,0 +1,307 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CommonHWSettingsWidget</class>
|
||||
<widget class="QWidget" name="CommonHWSettingsWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>605</width>
|
||||
<height>208</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_10">
|
||||
<item row="4" column="0">
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="6">
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="3">
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="5">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="5">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Options</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" rowspan="5" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="verticalSpacing">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbGPSSpeed">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GPS Speed</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cbTelemetrySpeed">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="frame">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbTelemetrySpeed">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Telemetry Speed</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbGPSProtocol">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>GPS Protocol</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cbGPSProtocol">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="lbDebugConsoleSpeed">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DebugConsole Speed</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QComboBox" name="cbDebugConsoleSpeed">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="cbGPSSpeed">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="4" rowspan="5" colspan="2">
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<property name="verticalSpacing">
|
||||
<number>-1</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbUSBHID">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>USB HID</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cbUSBVCP">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QComboBox" name="cbSBUSMode">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cbUSBHID">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbDSMxBind">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>DSMx Bind</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbUSBVCP">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>USB VCP</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="lbSBUSMode">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>SBus Mode</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cbDSMxBind">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>250</width>
|
||||
<height>1</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -49,7 +49,8 @@ HEADERS += \
|
||||
mixercurve.h \
|
||||
dblspindelegate.h \
|
||||
configrevohwwidget.h \
|
||||
configspracingf3hwwidget.h \
|
||||
configspracingf3evohwwidget.h \
|
||||
commonhwsettingswidget.h \
|
||||
calibration/calibrationutils.h \
|
||||
calibration/wizardstate.h \
|
||||
calibration/wizardmodel.h \
|
||||
@ -97,7 +98,8 @@ SOURCES += \
|
||||
mixercurve.cpp \
|
||||
dblspindelegate.cpp \
|
||||
configrevohwwidget.cpp \
|
||||
configspracingf3hwwidget.cpp \
|
||||
configspracingf3evohwwidget.cpp \
|
||||
commonhwsettingswidget.cpp \
|
||||
calibration/calibrationutils.cpp \
|
||||
calibration/wizardstate.cpp \
|
||||
calibration/wizardmodel.cpp \
|
||||
@ -134,8 +136,9 @@ FORMS += \
|
||||
txpid.ui \
|
||||
mixercurve.ui \
|
||||
configrevohwwidget.ui \
|
||||
configspracingf3hwwidget.ui \
|
||||
autotune.ui \
|
||||
configspracingf3evohwwidget.ui \
|
||||
commonhwsettingswidget.ui \
|
||||
oplink.ui \
|
||||
configrevonanohwwidget.ui \
|
||||
configsparky2hwwidget.ui \
|
||||
|
@ -42,7 +42,7 @@
|
||||
#include "configrevowidget.h"
|
||||
#include "configrevonanohwwidget.h"
|
||||
#include "configsparky2hwwidget.h"
|
||||
#include "configspracingf3hwwidget.h"
|
||||
#include "configspracingf3evohwwidget.h"
|
||||
#include "defaultconfigwidget.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
@ -262,9 +262,9 @@ void ConfigGadgetWidget::onAutopilotConnect()
|
||||
widget = 0;
|
||||
|
||||
if (board == 0x1001) {
|
||||
widget = new ConfigSPRacingF3HWWidget(this);
|
||||
// widget = new ConfigSPRacingF3HWWidget(this);
|
||||
} else if (board == 0x1002 || board == 0x1003) { // SpracingF3 EVO or NucleoF303RE
|
||||
// widget = new ConfigSPRacingF3EVOHWWidget(this);
|
||||
widget = new ConfigSPRacingF3EVOHWWidget(this);
|
||||
} else if (board == 0x1005) {
|
||||
// widget = new ConfigPikoBLXHWWidget(this);
|
||||
} else if (board == 0x1006) {
|
||||
|
202
ground/gcs/src/plugins/config/configspracingf3evohwwidget.cpp
Normal file
202
ground/gcs/src/plugins/config/configspracingf3evohwwidget.cpp
Normal file
@ -0,0 +1,202 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configspracingf3evohwwidget.cpp
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016-2017.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
* @{
|
||||
* @brief SPRacingF3EVO hardware configuration panel
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "configspracingf3evohwwidget.h"
|
||||
|
||||
#include "ui_configspracingf3evohwwidget.h"
|
||||
|
||||
#include "hwsettings.h"
|
||||
#include "hwspracingf3evosettings.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
ConfigSPRacingF3EVOHWWidget::ConfigSPRacingF3EVOHWWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
{
|
||||
m_ui = new Ui_SPRacingF3EVOHWWidget();
|
||||
m_ui->setupUi(this);
|
||||
|
||||
// must be done before auto binding !
|
||||
setWikiURL("SPRacingF3EVO+Configuration");
|
||||
|
||||
addAutoBindings();
|
||||
|
||||
addUAVObject("HwSettings");
|
||||
addUAVObject("HwSPRacingF3EVOSettings");
|
||||
|
||||
addWidgetBinding("HwSPRacingF3EVOSettings", "UARTPort", m_ui->cbUART1, 0, 1, true);
|
||||
addWidgetBinding("HwSPRacingF3EVOSettings", "UARTPort", m_ui->cbUART2, 1, 1, true);
|
||||
addWidgetBinding("HwSPRacingF3EVOSettings", "UARTPort", m_ui->cbUART3, 2, 1, true);
|
||||
addWidgetBinding("HwSPRacingF3EVOSettings", "LEDPort", m_ui->cbLEDPort);
|
||||
addWidgetBinding("HwSPRacingF3EVOSettings", "I2CPort", m_ui->cbI2C1);
|
||||
|
||||
connect(m_ui->cbUART1, static_cast<void(QComboBox::*) (int)>(&QComboBox::currentIndexChanged), this, &ConfigSPRacingF3EVOHWWidget::UART1Changed);
|
||||
connect(m_ui->cbUART2, static_cast<void(QComboBox::*) (int)>(&QComboBox::currentIndexChanged), this, &ConfigSPRacingF3EVOHWWidget::UART2Changed);
|
||||
connect(m_ui->cbUART3, static_cast<void(QComboBox::*) (int)>(&QComboBox::currentIndexChanged), this, &ConfigSPRacingF3EVOHWWidget::UART3Changed);
|
||||
|
||||
m_ui->commonHWSettings->registerWidgets(*this);
|
||||
|
||||
connect(m_ui->commonHWSettings, &CommonHWSettingsWidget::USBVCPFunctionChanged, this, &ConfigSPRacingF3EVOHWWidget::USBVCPFunctionChanged);
|
||||
|
||||
updateFeatures();
|
||||
}
|
||||
|
||||
ConfigSPRacingF3EVOHWWidget::~ConfigSPRacingF3EVOHWWidget()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3EVOHWWidget::refreshWidgetsValuesImpl(UAVObject *obj)
|
||||
{
|
||||
Q_UNUSED(obj);
|
||||
|
||||
UART1Changed(0);
|
||||
UART2Changed(0);
|
||||
UART3Changed(0);
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3EVOHWWidget::updateObjectsFromWidgetsImpl()
|
||||
{
|
||||
updateFeatures();
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3EVOHWWidget::updateFeatures()
|
||||
{
|
||||
quint32 features = CommonHWSettingsWidget::F_USB;
|
||||
|
||||
QComboBox *ports[3] = { m_ui->cbUART1, m_ui->cbUART2, m_ui->cbUART3 };
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
switch (getComboboxSelectedOption(ports[i])) {
|
||||
case HwSPRacingF3EVOSettings::UARTPORT_TELEMETRY:
|
||||
features |= CommonHWSettingsWidget::F_TELEMETRY;
|
||||
break;
|
||||
case HwSPRacingF3EVOSettings::UARTPORT_DSM:
|
||||
features |= CommonHWSettingsWidget::F_DSM;
|
||||
break;
|
||||
case HwSPRacingF3EVOSettings::UARTPORT_SBUS:
|
||||
features |= CommonHWSettingsWidget::F_SBUS;
|
||||
break;
|
||||
case HwSPRacingF3EVOSettings::UARTPORT_GPS:
|
||||
features |= CommonHWSettingsWidget::F_GPS;
|
||||
break;
|
||||
case HwSPRacingF3EVOSettings::UARTPORT_DEBUGCONSOLE:
|
||||
features |= CommonHWSettingsWidget::F_DEBUGCONSOLE;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_ui->commonHWSettings->setFeatures(features);
|
||||
|
||||
HwSettings::GetInstance(getObjectManager())
|
||||
->setOptionalModules(HwSettings::OPTIONALMODULES_GPS,
|
||||
(features & CommonHWSettingsWidget::F_GPS)
|
||||
? HwSettings::OPTIONALMODULES_ENABLED : HwSettings::OPTIONALMODULES_DISABLED);
|
||||
}
|
||||
|
||||
bool ConfigSPRacingF3EVOHWWidget::optionConflict(int uartOption, int vcpOption)
|
||||
{
|
||||
return (vcpOption == HwSettings::USB_VCPPORT_DEBUGCONSOLE
|
||||
&& uartOption == HwSPRacingF3EVOSettings::UARTPORT_DEBUGCONSOLE)
|
||||
|| (vcpOption == HwSettings::USB_VCPPORT_MAVLINK
|
||||
&& uartOption == HwSPRacingF3EVOSettings::UARTPORT_MAVLINK);
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3EVOHWWidget::UARTxChanged(QComboBox *cbUARTx)
|
||||
{
|
||||
/* Everything except HwSPRacingF3EVOSettings::UARTPORT_DISABLED and HwSPRacingF3EVOSettings::UARTPORT_DSM
|
||||
* is allowed on single port only.
|
||||
* HoTT SUMD & SUMH belong to the same receiver group, therefore cannot be configure at the same time
|
||||
*/
|
||||
|
||||
int option = getComboboxSelectedOption(cbUARTx);
|
||||
|
||||
if (option == HwSPRacingF3EVOSettings::UARTPORT_HOTTSUMD) {
|
||||
option = HwSPRacingF3EVOSettings::UARTPORT_HOTTSUMH;
|
||||
}
|
||||
|
||||
if (option != HwSPRacingF3EVOSettings::UARTPORT_DISABLED && option != HwSPRacingF3EVOSettings::UARTPORT_DSM) {
|
||||
QComboBox *ports[3] = { m_ui->cbUART1, m_ui->cbUART2, m_ui->cbUART3 };
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (ports[i] == cbUARTx) {
|
||||
continue;
|
||||
}
|
||||
int other = getComboboxSelectedOption(ports[i]);
|
||||
if (other == HwSPRacingF3EVOSettings::UARTPORT_HOTTSUMD) {
|
||||
other = HwSPRacingF3EVOSettings::UARTPORT_HOTTSUMH;
|
||||
}
|
||||
if (other == option) {
|
||||
setComboboxSelectedOption(ports[i], HwSPRacingF3EVOSettings::UARTPORT_DISABLED);
|
||||
}
|
||||
}
|
||||
|
||||
QComboBox *cbUSBVCP = m_ui->commonHWSettings->USBVCPComboBox();
|
||||
|
||||
if (optionConflict(option, getComboboxSelectedOption(cbUSBVCP))) {
|
||||
setComboboxSelectedOption(cbUSBVCP, HwSettings::USB_VCPPORT_DISABLED);
|
||||
}
|
||||
}
|
||||
|
||||
updateFeatures();
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3EVOHWWidget::USBVCPFunctionChanged(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
|
||||
int vcpOption = getComboboxSelectedOption(m_ui->commonHWSettings->USBVCPComboBox());
|
||||
|
||||
QComboBox *ports[3] = { m_ui->cbUART1, m_ui->cbUART2, m_ui->cbUART3 };
|
||||
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
if (optionConflict(getComboboxSelectedOption(ports[i]), vcpOption)) {
|
||||
setComboboxSelectedOption(ports[i], HwSPRacingF3EVOSettings::UARTPORT_DISABLED);
|
||||
}
|
||||
}
|
||||
|
||||
updateFeatures();
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3EVOHWWidget::UART1Changed(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
UARTxChanged(m_ui->cbUART1);
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3EVOHWWidget::UART2Changed(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
UARTxChanged(m_ui->cbUART2);
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3EVOHWWidget::UART3Changed(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
UARTxChanged(m_ui->cbUART3);
|
||||
}
|
@ -1,14 +1,14 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configspracingf3hwwidget.h
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
|
||||
* @file configspracingf3evohwwidget.h
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016-2017.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
* @{
|
||||
* @brief SPRacingF3 hardware configuration panel
|
||||
* @brief SPRacingF3EVO hardware configuration panel
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -25,36 +25,40 @@
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#ifndef CONFIGSPRACINGF3HWWIDGET_H
|
||||
#define CONFIGSPRACINGF3HWWIDGET_H
|
||||
#ifndef CONFIGSPRACINGF3EVOHWWIDGET_H
|
||||
#define CONFIGSPRACINGF3EVOHWWIDGET_H
|
||||
|
||||
#include "../uavobjectwidgetutils/configtaskwidget.h"
|
||||
|
||||
class Ui_SPRacingF3HWWidget;
|
||||
class Ui_SPRacingF3EVOHWWidget;
|
||||
|
||||
class UAVObject;
|
||||
|
||||
class QWidget;
|
||||
|
||||
class ConfigSPRacingF3HWWidget : public ConfigTaskWidget {
|
||||
class ConfigSPRacingF3EVOHWWidget : public ConfigTaskWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ConfigSPRacingF3HWWidget(QWidget *parent = 0);
|
||||
~ConfigSPRacingF3HWWidget();
|
||||
ConfigSPRacingF3EVOHWWidget(QWidget *parent = 0);
|
||||
~ConfigSPRacingF3EVOHWWidget();
|
||||
|
||||
protected:
|
||||
virtual void refreshWidgetsValuesImpl(UAVObject *obj);
|
||||
virtual void updateObjectsFromWidgetsImpl();
|
||||
|
||||
private:
|
||||
Ui_SPRacingF3HWWidget *m_ui;
|
||||
Ui_SPRacingF3EVOHWWidget *m_ui;
|
||||
void UARTxChanged(QComboBox *cbUARTx);
|
||||
void updateFeatures();
|
||||
|
||||
void setupCustomCombos();
|
||||
bool optionConflict(int uartOption, int vcpOption);
|
||||
|
||||
private slots:
|
||||
void usbVCPPortChanged(int index);
|
||||
void usbHIDPortChanged(int index);
|
||||
void UART1Changed(int index);
|
||||
void UART2Changed(int index);
|
||||
void UART3Changed(int index);
|
||||
void USBVCPFunctionChanged(int index);
|
||||
};
|
||||
|
||||
#endif // CONFIGSPRACINGF3HWWIDGET_H
|
||||
#endif // CONFIGSPRACINGF3EVOHWWIDGET_H
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SPRacingF3HWWidget</class>
|
||||
<widget class="QWidget" name="SPRacingF3HWWidget">
|
||||
<class>SPRacingF3EVOHWWidget</class>
|
||||
<widget class="QWidget" name="SPRacingF3EVOHWWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -139,22 +139,6 @@
|
||||
<property name="bottomMargin">
|
||||
<number>12</number>
|
||||
</property>
|
||||
<item row="1" column="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@ -168,8 +152,8 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<item row="2" column="3">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -181,6 +165,22 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="sizePolicy">
|
||||
@ -218,8 +218,8 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<item row="2" column="0">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -232,239 +232,8 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0,0,0,0">
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="lbUART3">
|
||||
<property name="text">
|
||||
<string>UART3
|
||||
(bottom)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QComboBox" name="cbUART2"/>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QLabel" name="lbUART2">
|
||||
<property name="text">
|
||||
<string>UART2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QComboBox" name="cbUART3"/>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="cbUART1"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lbUART1">
|
||||
<property name="text">
|
||||
<string>UART1
|
||||
(bottom)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="5">
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>120</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="2">
|
||||
<widget class="QComboBox" name="cbI2C1"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lbI2C1">
|
||||
<property name="text">
|
||||
<string>I2C1
|
||||
(bottom)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>90</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="6">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="0">
|
||||
<widget class="QComboBox" name="cbSonar"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QComboBox" name="cbADC1"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QComboBox" name="cbADC2"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="cbIO2"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lbIO2">
|
||||
<property name="text">
|
||||
<string>IO-2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="lbSonar">
|
||||
<property name="text">
|
||||
<string>Sonar</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="lbADC2">
|
||||
<property name="text">
|
||||
<string>ADC2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="lbADC1">
|
||||
<property name="text">
|
||||
<string>ADC1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="2" column="1" rowspan="3" colspan="5" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="0,0,0,0,0">
|
||||
<item row="2" column="1" colspan="5" alignment="Qt::AlignHCenter|Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="lbBoardImage">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
@ -482,7 +251,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="configgadget.qrc">:/configgadget/images/spracingf3_top.png</pixmap>
|
||||
<pixmap resource="configgadget.qrc">:/configgadget/images/spracingf3evo_top.png</pixmap>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>false</bool>
|
||||
@ -495,271 +264,163 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cbIO1"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbIO1">
|
||||
<property name="text">
|
||||
<string>IO-1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="cbLEDPort"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<item row="0" column="3">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>10</height>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lbLEDPort">
|
||||
<property name="text">
|
||||
<string>LED Strip</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<item row="0" column="1">
|
||||
<widget class="QComboBox" name="cbADC3"/>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="1" column="1">
|
||||
<widget class="QComboBox" name="cbUART3"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbADC3">
|
||||
<property name="text">
|
||||
<string>VBAT</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_5">
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>70</height>
|
||||
<height>75</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="4" column="6">
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lbBuzzer">
|
||||
<property name="text">
|
||||
<string>Buzzer</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="cbBuzzer"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>70</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="7">
|
||||
<layout class="QGridLayout" name="gridLayout_10">
|
||||
<item row="3" column="6">
|
||||
<spacer name="horizontalSpacer_11">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="QLabel" name="lbSBUSInverted">
|
||||
<widget class="QLabel" name="lbUART3">
|
||||
<property name="text">
|
||||
<string>SBUS Inverted</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="lbGPSProtocol">
|
||||
<property name="text">
|
||||
<string>GPS Protocol</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="2">
|
||||
<widget class="QComboBox" name="comboBox"/>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QComboBox" name="cbTelemetrySpeed"/>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="QLabel" name="lbGPSSpeed">
|
||||
<property name="text">
|
||||
<string>GPS Speed</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="lbTelemetrySpeed">
|
||||
<property name="text">
|
||||
<string>Telemetry Speed</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="2">
|
||||
<widget class="QComboBox" name="cbGPSSpeed"/>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="horizontalSpacer_10">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="lbDebugConsoleSpeed">
|
||||
<property name="text">
|
||||
<string>DebugConsole Speed</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QComboBox" name="cbGPSProtocol"/>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="QLabel" name="lbDSMBind">
|
||||
<property name="text">
|
||||
<string>DSMx Bind</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<widget class="QComboBox" name="cbDSMxBind"/>
|
||||
</item>
|
||||
<item row="3" column="5">
|
||||
<widget class="QComboBox" name="cbSBUSInverted"/>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="5">
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="5">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Options</string>
|
||||
<string>UART3
|
||||
(pads)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="2">
|
||||
<item row="4" column="0" colspan="7">
|
||||
<widget class="CommonHWSettingsWidget" name="commonHWSettings" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>80</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="6">
|
||||
<layout class="QGridLayout" name="gridLayout_4">
|
||||
<item row="3" column="0">
|
||||
<widget class="QComboBox" name="cbLEDPort"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="lbUART1">
|
||||
<property name="text">
|
||||
<string>UART1
|
||||
(pads)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QComboBox" name="cbUART1"/>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<spacer name="verticalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>75</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<spacer name="verticalSpacer_8">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>35</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="lbLEDPort">
|
||||
<property name="text">
|
||||
<string>IR/LED</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<spacer name="verticalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>60</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
@ -768,6 +429,39 @@
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QLabel" name="lbUART2">
|
||||
<property name="text">
|
||||
<string>UART2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="4" colspan="2">
|
||||
<widget class="QLabel" name="lbI2C1">
|
||||
<property name="text">
|
||||
<string>I2C1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignBottom|Qt::AlignHCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1" colspan="2">
|
||||
<widget class="QComboBox" name="cbUART2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4" colspan="2">
|
||||
<widget class="QComboBox" name="cbI2C1"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
@ -981,6 +675,14 @@ Beware of not locking yourself out!</string>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>CommonHWSettingsWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>commonhwsettingswidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="../coreplugin/core.qrc"/>
|
||||
<include location="configgadget.qrc"/>
|
@ -1,467 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file configspracingf3hwwidget.cpp
|
||||
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
|
||||
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup ConfigPlugin Config Plugin
|
||||
* @{
|
||||
* @brief SPRacingF3 hardware configuration panel
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "configspracingf3hwwidget.h"
|
||||
|
||||
#include "ui_configspracingf3hwwidget.h"
|
||||
|
||||
#include "hwsettings.h"
|
||||
#include "hwspracingf3settings.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
ConfigSPRacingF3HWWidget::ConfigSPRacingF3HWWidget(QWidget *parent) : ConfigTaskWidget(parent)
|
||||
{
|
||||
m_ui = new Ui_SPRacingF3HWWidget();
|
||||
m_ui->setupUi(this);
|
||||
|
||||
// must be done before auto binding !
|
||||
setWikiURL("SPRacingF3+Configuration");
|
||||
|
||||
addAutoBindings();
|
||||
|
||||
addUAVObject("HwSettings");
|
||||
|
||||
// addWidgetBinding("HwSettings", "RM_FlexiPort", m_ui->cbFlexi);
|
||||
// addWidgetBinding("HwSettings", "RM_MainPort", m_ui->cbMain);
|
||||
// addWidgetBinding("HwSettings", "RM_RcvrPort", m_ui->cbRcvr);
|
||||
//
|
||||
// addWidgetBinding("HwSettings", "USB_HIDPort", m_ui->cbUSBHIDFunction);
|
||||
// addWidgetBinding("HwSettings", "USB_VCPPort", m_ui->cbUSBVCPFunction);
|
||||
//
|
||||
// addWidgetBinding("HwSettings", "TelemetrySpeed", m_ui->cbFlexiTelemSpeed);
|
||||
// addWidgetBinding("HwSettings", "GPSSpeed", m_ui->cbFlexiGPSSpeed);
|
||||
//
|
||||
// addWidgetBinding("HwSettings", "TelemetrySpeed", m_ui->cbMainTelemSpeed);
|
||||
// addWidgetBinding("HwSettings", "GPSSpeed", m_ui->cbMainGPSSpeed);
|
||||
//
|
||||
// addWidgetBinding("HwSettings", "TelemetrySpeed", m_ui->cbRcvrTelemSpeed);
|
||||
// addWidgetBinding("HwSettings", "GPSSpeed", m_ui->cbRcvrGPSSpeed);
|
||||
//
|
||||
//// Add Gps protocol configuration
|
||||
// addWidgetBinding("GPSSettings", "DataProtocol", m_ui->cbMainGPSProtocol);
|
||||
// addWidgetBinding("GPSSettings", "DataProtocol", m_ui->cbFlexiGPSProtocol);
|
||||
// addWidgetBinding("GPSSettings", "DataProtocol", m_ui->cbRcvrGPSProtocol);
|
||||
|
||||
setupCustomCombos();
|
||||
}
|
||||
|
||||
ConfigSPRacingF3HWWidget::~ConfigSPRacingF3HWWidget()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3HWWidget::setupCustomCombos()
|
||||
{
|
||||
// connect(m_ui->cbUSBHIDFunction, SIGNAL(currentIndexChanged(int)), this, SLOT(usbHIDPortChanged(int)));
|
||||
// connect(m_ui->cbUSBVCPFunction, SIGNAL(currentIndexChanged(int)), this, SLOT(usbVCPPortChanged(int)));
|
||||
//
|
||||
// m_ui->cbSonar->addItem(tr("Disabled"));
|
||||
// m_ui->cbSonar->setCurrentIndex(0);
|
||||
// m_ui->cbSonar->setEnabled(false);
|
||||
//
|
||||
// connect(m_ui->cbFlexi, SIGNAL(currentIndexChanged(int)), this, SLOT(flexiPortChanged(int)));
|
||||
// connect(m_ui->cbMain, SIGNAL(currentIndexChanged(int)), this, SLOT(mainPortChanged(int)));
|
||||
// connect(m_ui->cbRcvr, SIGNAL(currentIndexChanged(int)), this, SLOT(rcvrPortChanged(int)));
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3HWWidget::refreshWidgetsValuesImpl(UAVObject *obj)
|
||||
{
|
||||
Q_UNUSED(obj);
|
||||
|
||||
// usbVCPPortChanged(0);
|
||||
// mainPortChanged(0);
|
||||
// flexiPortChanged(0);
|
||||
// rcvrPortChanged(0);
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3HWWidget::updateObjectsFromWidgetsImpl()
|
||||
{
|
||||
// If any port is configured to be GPS port, enable GPS module if it is not enabled.
|
||||
// Otherwise disable GPS module.
|
||||
// quint8 enableModule = HwSettings::OPTIONALMODULES_DISABLED;
|
||||
//
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_GPS)
|
||||
// || isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_GPS)) {
|
||||
// enableModule = HwSettings::OPTIONALMODULES_ENABLED;
|
||||
// }
|
||||
//
|
||||
// HwSettings *hwSettings = HwSettings::GetInstance(getObjectManager());
|
||||
// hwSettings->setOptionalModules(HwSettings::OPTIONALMODULES_GPS, enableModule);
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3HWWidget::usbVCPPortChanged(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
|
||||
// bool vcpComBridgeEnabled = isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_COMBRIDGE);
|
||||
//
|
||||
// if (!vcpComBridgeEnabled && isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_COMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// enableComboBoxOptionItem(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_COMBRIDGE, vcpComBridgeEnabled);
|
||||
//
|
||||
// if (!vcpComBridgeEnabled && isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_COMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// enableComboBoxOptionItem(m_ui->cbMain, HwSettings::RM_MAINPORT_COMBRIDGE, vcpComBridgeEnabled);
|
||||
//
|
||||
// if (!vcpComBridgeEnabled && isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_COMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// if (!vcpComBridgeEnabled && isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMCOMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
//
|
||||
// enableComboBoxOptionItem(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_COMBRIDGE, vcpComBridgeEnabled);
|
||||
// enableComboBoxOptionItem(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMCOMBRIDGE, vcpComBridgeEnabled);
|
||||
//
|
||||
//// _DEBUGCONSOLE modes are mutual exclusive
|
||||
// if (isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DEBUGCONSOLE)) {
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMDEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//// _USBTELEMETRY modes are mutual exclusive
|
||||
// if (isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)
|
||||
// && isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_DISABLED);
|
||||
// }
|
||||
}
|
||||
|
||||
void ConfigSPRacingF3HWWidget::usbHIDPortChanged(int index)
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
|
||||
//// _USBTELEMETRY modes are mutual exclusive
|
||||
// if (isComboboxOptionSelected(m_ui->cbUSBHIDFunction, HwSettings::USB_HIDPORT_USBTELEMETRY)
|
||||
// && isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_USBTELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DISABLED);
|
||||
// }
|
||||
}
|
||||
|
||||
// void ConfigSPRacingF3HWWidget::flexiPortChanged(int index)
|
||||
// {
|
||||
// Q_UNUSED(index);
|
||||
//
|
||||
// m_ui->cbFlexiTelemSpeed->setVisible(false);
|
||||
// m_ui->cbFlexiGPSSpeed->setVisible(false);
|
||||
// m_ui->lblFlexiSpeed->setVisible(true);
|
||||
//
|
||||
//// Add Gps protocol configuration
|
||||
// m_ui->cbFlexiGPSProtocol->setVisible(false);
|
||||
// m_ui->lbFlexiGPSProtocol->setVisible(false);
|
||||
//
|
||||
// switch (getComboboxSelectedOption(m_ui->cbFlexi)) {
|
||||
// case HwSettings::RM_FLEXIPORT_TELEMETRY:
|
||||
// m_ui->cbFlexiTelemSpeed->setVisible(true);
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_TELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMTELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_TELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_FLEXIPORT_GPS:
|
||||
//// Add Gps protocol configuration
|
||||
// m_ui->cbFlexiGPSProtocol->setVisible(true);
|
||||
// m_ui->lbFlexiGPSProtocol->setVisible(true);
|
||||
//
|
||||
// m_ui->cbFlexiGPSSpeed->setVisible(true);
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_GPS)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMGPS)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_GPS)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
//
|
||||
// break;
|
||||
// case HwSettings::RM_FLEXIPORT_COMBRIDGE:
|
||||
// m_ui->lblFlexiSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_COMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_COMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMCOMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_FLEXIPORT_DEBUGCONSOLE:
|
||||
// m_ui->lblFlexiSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMDEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_FLEXIPORT_OSDHK:
|
||||
// m_ui->lblFlexiSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_OSDHK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_FLEXIPORT_MSP:
|
||||
// m_ui->lblFlexiSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_MSP)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_MSP)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMMSP)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_FLEXIPORT_MAVLINK:
|
||||
// m_ui->lblFlexiSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_MAVLINK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_MAVLINK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMMAVLINK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// m_ui->lblFlexiSpeed->setVisible(false);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// void ConfigSPRacingF3HWWidget::mainPortChanged(int index)
|
||||
// {
|
||||
// Q_UNUSED(index);
|
||||
//
|
||||
// m_ui->cbMainTelemSpeed->setVisible(false);
|
||||
// m_ui->cbMainGPSSpeed->setVisible(false);
|
||||
// m_ui->lblMainSpeed->setVisible(true);
|
||||
//
|
||||
//// Add Gps protocol configuration
|
||||
// m_ui->cbMainGPSProtocol->setVisible(false);
|
||||
// m_ui->lbMainGPSProtocol->setVisible(false);
|
||||
//
|
||||
// switch (getComboboxSelectedOption(m_ui->cbMain)) {
|
||||
// case HwSettings::RM_MAINPORT_TELEMETRY:
|
||||
// m_ui->cbMainTelemSpeed->setVisible(true);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_TELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMTELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_TELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_MAINPORT_GPS:
|
||||
//// Add Gps protocol configuration
|
||||
// m_ui->cbMainGPSProtocol->setVisible(true);
|
||||
// m_ui->lbMainGPSProtocol->setVisible(true);
|
||||
//
|
||||
// m_ui->cbMainGPSSpeed->setVisible(true);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_GPS)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMGPS)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_GPS)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_MAINPORT_COMBRIDGE:
|
||||
// m_ui->lblMainSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_COMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_COMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMCOMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_MAINPORT_DEBUGCONSOLE:
|
||||
// m_ui->lblMainSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbUSBVCPFunction, HwSettings::USB_VCPPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMDEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_MAINPORT_OSDHK:
|
||||
// m_ui->lblMainSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_OSDHK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_MAINPORT_MSP:
|
||||
// m_ui->lblMainSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_MSP)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_MSP)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMMSP)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_MAINPORT_MAVLINK:
|
||||
// m_ui->lblMainSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_MAVLINK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_MAVLINK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPMMAVLINK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbRcvr, HwSettings::RM_RCVRPORT_PPM);
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// m_ui->lblMainSpeed->setVisible(false);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// void ConfigSPRacingF3HWWidget::rcvrPortChanged(int index)
|
||||
// {
|
||||
// Q_UNUSED(index);
|
||||
// m_ui->lblRcvrSpeed->setVisible(true);
|
||||
// m_ui->cbRcvrTelemSpeed->setVisible(false);
|
||||
// m_ui->cbRcvrGPSSpeed->setVisible(false);
|
||||
//
|
||||
//// Add Gps protocol configuration
|
||||
// m_ui->cbRcvrGPSProtocol->setVisible(false);
|
||||
// m_ui->lblRcvrGPSProtocol->setVisible(false);
|
||||
//
|
||||
// switch (getComboboxSelectedOption(m_ui->cbRcvr)) {
|
||||
// case HwSettings::RM_RCVRPORT_TELEMETRY:
|
||||
// case HwSettings::RM_RCVRPORT_PPMTELEMETRY:
|
||||
// m_ui->cbRcvrTelemSpeed->setVisible(true);
|
||||
//
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_TELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_TELEMETRY)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_RCVRPORT_COMBRIDGE:
|
||||
// case HwSettings::RM_RCVRPORT_PPMCOMBRIDGE:
|
||||
// m_ui->lblRcvrSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_COMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_COMBRIDGE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_RCVRPORT_DEBUGCONSOLE:
|
||||
// case HwSettings::RM_RCVRPORT_PPMDEBUGCONSOLE:
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_DEBUGCONSOLE)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_RCVRPORT_GPS:
|
||||
// case HwSettings::RM_RCVRPORT_PPMGPS:
|
||||
//// Add Gps protocol configuration
|
||||
// m_ui->cbRcvrGPSProtocol->setVisible(true);
|
||||
// m_ui->lblRcvrGPSProtocol->setVisible(true);
|
||||
//
|
||||
// m_ui->cbRcvrGPSSpeed->setVisible(true);
|
||||
//
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_GPS)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_GPS)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_RCVRPORT_MSP:
|
||||
// case HwSettings::RM_RCVRPORT_PPMMSP:
|
||||
// m_ui->lblRcvrSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_MSP)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_MSP)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// case HwSettings::RM_RCVRPORT_MAVLINK:
|
||||
// case HwSettings::RM_RCVRPORT_PPMMAVLINK:
|
||||
// m_ui->lblRcvrSpeed->setVisible(false);
|
||||
// if (isComboboxOptionSelected(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_MAVLINK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbFlexi, HwSettings::RM_FLEXIPORT_DISABLED);
|
||||
// }
|
||||
// if (isComboboxOptionSelected(m_ui->cbMain, HwSettings::RM_MAINPORT_MAVLINK)) {
|
||||
// setComboboxSelectedOption(m_ui->cbMain, HwSettings::RM_MAINPORT_DISABLED);
|
||||
// }
|
||||
// break;
|
||||
// default:
|
||||
// m_ui->lblRcvrSpeed->setVisible(false);
|
||||
// break;
|
||||
// }
|
||||
// }
|
Loading…
Reference in New Issue
Block a user