2011-11-09 19:35:53 +01:00
|
|
|
/**
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* @file outputchannelform.cpp
|
2011-11-17 14:33:49 +01:00
|
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2011.
|
2011-11-09 19:35:53 +01:00
|
|
|
* @addtogroup GCSPlugins GCS Plugins
|
|
|
|
* @{
|
|
|
|
* @addtogroup ConfigPlugin Config Plugin
|
|
|
|
* @{
|
|
|
|
* @brief Servo output configuration form for the config output gadget
|
|
|
|
*****************************************************************************/
|
|
|
|
/*
|
|
|
|
* 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 "outputchannelform.h"
|
|
|
|
|
2015-02-08 19:10:56 +01:00
|
|
|
#define MAXOUTPUT_VALUE 2500
|
|
|
|
#define MINOUTPUT_VALUE 500
|
2015-02-07 13:00:10 +01:00
|
|
|
|
2014-05-10 20:40:14 +02:00
|
|
|
OutputChannelForm::OutputChannelForm(const int index, QWidget *parent) :
|
2014-05-12 22:30:50 +02:00
|
|
|
ChannelForm(index, parent), ui(), m_inChannelTest(false)
|
2011-11-09 19:35:53 +01:00
|
|
|
{
|
|
|
|
ui.setupUi(this);
|
2014-05-10 20:40:14 +02:00
|
|
|
|
|
|
|
// The convention for OP is Channel 1 to Channel 10.
|
2015-02-01 21:27:25 +01:00
|
|
|
ui.actuatorNumber->setText(QString("%1").arg(index + 1));
|
2015-01-27 19:39:45 +01:00
|
|
|
setBank("-");
|
2014-05-10 20:40:14 +02:00
|
|
|
// Register for ActuatorSettings changes:
|
|
|
|
connect(ui.actuatorMin, SIGNAL(editingFinished()), this, SLOT(setChannelRange()));
|
|
|
|
connect(ui.actuatorMax, SIGNAL(editingFinished()), this, SLOT(setChannelRange()));
|
|
|
|
connect(ui.actuatorRev, SIGNAL(toggled(bool)), this, SLOT(reverseChannel(bool)));
|
|
|
|
// Now connect the channel out sliders to our signal to send updates in test mode
|
|
|
|
connect(ui.actuatorNeutral, SIGNAL(valueChanged(int)), this, SLOT(sendChannelTest(int)));
|
|
|
|
|
|
|
|
ui.actuatorLink->setChecked(false);
|
|
|
|
connect(ui.actuatorLink, SIGNAL(toggled(bool)), this, SLOT(linkToggled(bool)));
|
|
|
|
|
2015-02-07 13:19:46 +01:00
|
|
|
// Set limits
|
2015-02-07 13:00:10 +01:00
|
|
|
ui.actuatorMin->setMaximum(MAXOUTPUT_VALUE);
|
|
|
|
ui.actuatorMax->setMaximum(MAXOUTPUT_VALUE);
|
|
|
|
ui.actuatorValue->setMaximum(MAXOUTPUT_VALUE);
|
|
|
|
ui.actuatorMin->setMinimum(MINOUTPUT_VALUE);
|
|
|
|
ui.actuatorMax->setMinimum(MINOUTPUT_VALUE);
|
2015-02-07 13:19:46 +01:00
|
|
|
ui.actuatorValue->setMinimum(MINOUTPUT_VALUE);
|
2015-02-07 13:00:10 +01:00
|
|
|
|
2015-02-18 00:34:38 +01:00
|
|
|
setChannelRange();
|
|
|
|
|
2014-05-10 20:40:14 +02:00
|
|
|
disableMouseWheelEvents();
|
|
|
|
}
|
|
|
|
|
|
|
|
OutputChannelForm::~OutputChannelForm()
|
|
|
|
{
|
|
|
|
// Do nothing
|
|
|
|
}
|
|
|
|
|
2014-05-12 22:30:50 +02:00
|
|
|
QString OutputChannelForm::name()
|
2014-05-10 20:40:14 +02:00
|
|
|
{
|
2014-05-12 22:30:50 +02:00
|
|
|
return ui.actuatorName->text();
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
|
2015-01-27 19:39:45 +01:00
|
|
|
QString OutputChannelForm::bank()
|
|
|
|
{
|
|
|
|
return ui.actuatorBankNumber->text();
|
|
|
|
}
|
|
|
|
|
2014-05-12 22:30:50 +02:00
|
|
|
/**
|
|
|
|
* Set the channel assignment label.
|
|
|
|
*/
|
|
|
|
void OutputChannelForm::setName(const QString &name)
|
|
|
|
{
|
|
|
|
ui.actuatorName->setText(name);
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
|
2015-01-27 19:39:45 +01:00
|
|
|
void OutputChannelForm::setColor(const QColor &color)
|
|
|
|
{
|
2015-02-01 21:27:25 +01:00
|
|
|
QString stylesheet = ui.actuatorNumberFrame->styleSheet();
|
2015-01-27 19:39:45 +01:00
|
|
|
|
2015-02-01 21:27:25 +01:00
|
|
|
stylesheet = stylesheet.split("background-color").first();
|
|
|
|
stylesheet.append(
|
|
|
|
QString("background-color: rgb(%1, %2, %3)")
|
|
|
|
.arg(color.red()).arg(color.green()).arg(color.blue()));
|
|
|
|
ui.actuatorNumberFrame->setStyleSheet(stylesheet);
|
2015-01-27 19:39:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the channel bank label.
|
|
|
|
*/
|
|
|
|
void OutputChannelForm::setBank(const QString &bank)
|
|
|
|
{
|
|
|
|
ui.actuatorBankNumber->setText(bank);
|
|
|
|
}
|
|
|
|
|
2011-11-09 19:35:53 +01:00
|
|
|
/**
|
|
|
|
* Restrict UI to protect users from accidental misuse.
|
|
|
|
*/
|
|
|
|
void OutputChannelForm::enableChannelTest(bool state)
|
|
|
|
{
|
2013-05-19 17:37:30 +03:00
|
|
|
if (m_inChannelTest == state) {
|
|
|
|
return;
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
m_inChannelTest = state;
|
|
|
|
|
2013-05-19 17:37:30 +03:00
|
|
|
if (m_inChannelTest) {
|
2011-11-09 19:35:53 +01:00
|
|
|
// Prevent stupid users from touching the minimum & maximum ranges while
|
|
|
|
// moving the sliders. Thanks Ivan for the tip :)
|
|
|
|
ui.actuatorMin->setEnabled(false);
|
|
|
|
ui.actuatorMax->setEnabled(false);
|
|
|
|
ui.actuatorRev->setEnabled(false);
|
2013-05-19 17:37:30 +03:00
|
|
|
} else {
|
2011-11-09 19:35:53 +01:00
|
|
|
ui.actuatorMin->setEnabled(true);
|
|
|
|
ui.actuatorMax->setEnabled(true);
|
2015-02-18 00:34:38 +01:00
|
|
|
if (m_mixerType != "Motor") {
|
|
|
|
ui.actuatorRev->setEnabled(true);
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Toggles the channel linked state for use in testing mode
|
|
|
|
*/
|
|
|
|
void OutputChannelForm::linkToggled(bool state)
|
|
|
|
{
|
|
|
|
Q_UNUSED(state)
|
|
|
|
|
2013-05-19 17:37:30 +03:00
|
|
|
if (!m_inChannelTest) {
|
|
|
|
return; // we are not in Test Output mode
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
// find the minimum slider value for the linked ones
|
2013-05-19 17:37:30 +03:00
|
|
|
if (!parent()) {
|
|
|
|
return;
|
|
|
|
}
|
2015-02-18 00:34:38 +01:00
|
|
|
int min = MAXOUTPUT_VALUE;
|
2011-11-09 19:35:53 +01:00
|
|
|
int linked_count = 0;
|
2013-05-19 17:37:30 +03:00
|
|
|
QList<OutputChannelForm *> outputChannelForms = parent()->findChildren<OutputChannelForm *>();
|
2011-11-09 19:35:53 +01:00
|
|
|
// set the linked channels of the parent widget to the same value
|
2013-05-19 17:37:30 +03:00
|
|
|
foreach(OutputChannelForm * outputChannelForm, outputChannelForms) {
|
|
|
|
if (!outputChannelForm->ui.actuatorLink->checkState()) {
|
2011-11-09 19:35:53 +01:00
|
|
|
continue;
|
2013-05-19 17:37:30 +03:00
|
|
|
}
|
|
|
|
if (this == outputChannelForm) {
|
2011-11-09 19:35:53 +01:00
|
|
|
continue;
|
2013-05-19 17:37:30 +03:00
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
int value = outputChannelForm->ui.actuatorNeutral->value();
|
2013-05-19 17:37:30 +03:00
|
|
|
if (min > value) {
|
|
|
|
min = value;
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
linked_count++;
|
|
|
|
}
|
|
|
|
|
2013-05-19 17:37:30 +03:00
|
|
|
if (linked_count <= 0) {
|
|
|
|
return; // no linked channels
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
// set the linked channels to the same value
|
2013-05-19 17:37:30 +03:00
|
|
|
foreach(OutputChannelForm * outputChannelForm, outputChannelForms) {
|
|
|
|
if (!outputChannelForm->ui.actuatorLink->checkState()) {
|
2011-11-09 19:35:53 +01:00
|
|
|
continue;
|
2013-05-19 17:37:30 +03:00
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
outputChannelForm->ui.actuatorNeutral->setValue(min);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-05-12 22:30:50 +02:00
|
|
|
int OutputChannelForm::max() const
|
|
|
|
{
|
|
|
|
return ui.actuatorMax->value();
|
|
|
|
}
|
|
|
|
|
2011-11-09 19:35:53 +01:00
|
|
|
/**
|
|
|
|
* Set maximal channel value.
|
|
|
|
*/
|
2014-05-12 22:30:50 +02:00
|
|
|
void OutputChannelForm::setMax(int maximum)
|
|
|
|
{
|
2015-02-18 00:34:38 +01:00
|
|
|
setRange(ui.actuatorMax->value(), maximum);
|
2014-05-12 22:30:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int OutputChannelForm::min() const
|
2011-11-09 19:35:53 +01:00
|
|
|
{
|
2014-05-12 22:30:50 +02:00
|
|
|
return ui.actuatorMin->value();
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set minimal channel value.
|
|
|
|
*/
|
2014-05-12 22:30:50 +02:00
|
|
|
void OutputChannelForm::setMin(int minimum)
|
2011-11-09 19:35:53 +01:00
|
|
|
{
|
2015-02-18 00:34:38 +01:00
|
|
|
setRange(minimum, ui.actuatorMin->value());
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
|
2014-05-12 22:30:50 +02:00
|
|
|
int OutputChannelForm::neutral() const
|
2011-11-09 19:35:53 +01:00
|
|
|
{
|
2014-05-12 22:30:50 +02:00
|
|
|
return ui.actuatorNeutral->value();
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set neutral of channel.
|
|
|
|
*/
|
2014-05-12 22:30:50 +02:00
|
|
|
void OutputChannelForm::setNeutral(int value)
|
2011-11-09 19:35:53 +01:00
|
|
|
{
|
|
|
|
ui.actuatorNeutral->setValue(value);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2014-05-12 22:30:50 +02:00
|
|
|
* Set minimal and maximal channel value.
|
2011-11-09 19:35:53 +01:00
|
|
|
*/
|
2014-05-12 22:30:50 +02:00
|
|
|
void OutputChannelForm::setRange(int minimum, int maximum)
|
2011-11-09 19:35:53 +01:00
|
|
|
{
|
2014-05-12 22:30:50 +02:00
|
|
|
ui.actuatorMin->setValue(minimum);
|
|
|
|
ui.actuatorMax->setValue(maximum);
|
|
|
|
setChannelRange();
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the minimum/maximum value of the channel output sliders.
|
|
|
|
* Have to do it here because setMinimum is not a slot.
|
|
|
|
*
|
|
|
|
* One added trick: if the slider is at its min when the value
|
|
|
|
* is changed, then keep it on the min.
|
|
|
|
*/
|
|
|
|
void OutputChannelForm::setChannelRange()
|
|
|
|
{
|
2015-02-18 00:34:38 +01:00
|
|
|
int minValue = ui.actuatorMin->value();
|
|
|
|
int maxValue = ui.actuatorMax->value();
|
2011-11-09 19:35:53 +01:00
|
|
|
|
2015-02-18 00:34:38 +01:00
|
|
|
int oldMini = ui.actuatorNeutral->minimum();
|
|
|
|
int oldMaxi = ui.actuatorNeutral->maximum();
|
2013-05-19 17:37:30 +03:00
|
|
|
|
2015-02-18 00:34:38 +01:00
|
|
|
m_mixerType = outputMixerType();
|
|
|
|
|
|
|
|
// Red handle for Motors
|
|
|
|
if ((m_mixerType == "Motor") || (m_mixerType == "ReversableMotor")) {
|
|
|
|
ui.actuatorNeutral->setStyleSheet("QSlider::handle:horizontal { background: rgb(255, 100, 100); width: 18px; height: 28px;"
|
|
|
|
"margin: -3px 0; border-radius: 3px; border: 1px solid #777; }");
|
2013-05-19 17:37:30 +03:00
|
|
|
} else {
|
2015-02-18 00:34:38 +01:00
|
|
|
ui.actuatorNeutral->setStyleSheet("QSlider::handle:horizontal { background: rgb(196, 196, 196); width: 18px; height: 28px;"
|
|
|
|
"margin: -3px 0; border-radius: 3px; border: 1px solid #777; }");
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
|
2015-02-18 00:34:38 +01:00
|
|
|
// Normal motor will be *** never *** reversed : without arming a "Min" value (like 1900) can be applied !
|
|
|
|
if (m_mixerType == "Motor") {
|
|
|
|
if (minValue >= maxValue) {
|
|
|
|
// Keep old values
|
|
|
|
ui.actuatorMin->setValue(oldMini);
|
|
|
|
ui.actuatorMax->setValue(oldMaxi);
|
|
|
|
}
|
|
|
|
ui.actuatorRev->setChecked(false);
|
|
|
|
ui.actuatorRev->setEnabled(false);
|
|
|
|
ui.actuatorNeutral->setInvertedAppearance(false);
|
|
|
|
ui.actuatorNeutral->setRange(ui.actuatorMin->value(), ui.actuatorMax->value());
|
|
|
|
} else {
|
|
|
|
// Others output (!Motor)
|
|
|
|
// Auto check reverse checkbox SpinBox Min/Max changes
|
|
|
|
ui.actuatorRev->setEnabled(true);
|
|
|
|
if (minValue <= maxValue) {
|
|
|
|
ui.actuatorRev->setChecked(false);
|
|
|
|
ui.actuatorNeutral->setInvertedAppearance(false);
|
|
|
|
ui.actuatorNeutral->setRange(minValue, maxValue);
|
|
|
|
} else {
|
|
|
|
ui.actuatorRev->setChecked(true);
|
|
|
|
ui.actuatorNeutral->setInvertedAppearance(true);
|
|
|
|
ui.actuatorNeutral->setRange(maxValue, minValue);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// If old neutral was Min, stay Min
|
2013-05-19 17:37:30 +03:00
|
|
|
if (ui.actuatorNeutral->value() == oldMini) {
|
2011-11-09 19:35:53 +01:00
|
|
|
ui.actuatorNeutral->setValue(ui.actuatorNeutral->minimum());
|
2013-05-19 17:37:30 +03:00
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
|
2015-02-07 13:00:10 +01:00
|
|
|
// Enable only outputs already set in mixer
|
2015-02-18 00:34:38 +01:00
|
|
|
if (m_mixerType != "Disabled") {
|
2015-02-07 13:00:10 +01:00
|
|
|
ui.actuatorMin->setEnabled(true);
|
|
|
|
ui.actuatorMax->setEnabled(true);
|
|
|
|
ui.actuatorNeutral->setEnabled(true);
|
|
|
|
ui.actuatorValue->setEnabled(true);
|
|
|
|
} else {
|
|
|
|
ui.actuatorMin->setEnabled(false);
|
|
|
|
ui.actuatorMax->setEnabled(false);
|
|
|
|
ui.actuatorRev->setEnabled(false);
|
|
|
|
ui.actuatorLink->setEnabled(false);
|
|
|
|
ui.actuatorMin->setValue(1000);
|
|
|
|
ui.actuatorMax->setValue(1000);
|
|
|
|
ui.actuatorNeutral->setRange(minValue, maxValue);
|
2015-02-18 00:34:38 +01:00
|
|
|
ui.actuatorNeutral->setValue(minValue);
|
2015-02-07 13:00:10 +01:00
|
|
|
ui.actuatorValue->setEnabled(false);
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverses the channel when the checkbox is clicked
|
|
|
|
*/
|
|
|
|
void OutputChannelForm::reverseChannel(bool state)
|
|
|
|
{
|
2015-02-18 00:34:38 +01:00
|
|
|
// if 'state' (reverse channel requested) apply only if not already reversed
|
|
|
|
if ((state && (ui.actuatorMax->value() > ui.actuatorMin->value()))
|
|
|
|
|| (!state && (ui.actuatorMax->value() < ui.actuatorMin->value()))) {
|
|
|
|
// Now, swap the min & max values (spin boxes)
|
|
|
|
int temp = ui.actuatorMax->value();
|
|
|
|
ui.actuatorMax->setValue(ui.actuatorMin->value());
|
|
|
|
ui.actuatorMin->setValue(temp);
|
|
|
|
ui.actuatorNeutral->setInvertedAppearance(state);
|
2015-02-18 01:50:38 +01:00
|
|
|
|
|
|
|
setChannelRange();
|
2011-11-09 19:35:53 +01:00
|
|
|
return;
|
2013-05-19 17:37:30 +03:00
|
|
|
}
|
2015-02-18 01:50:38 +01:00
|
|
|
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Emits the channel value which will be send to the UAV to move the servo.
|
|
|
|
* Returns immediately if we are not in testing mode.
|
|
|
|
*/
|
|
|
|
void OutputChannelForm::sendChannelTest(int value)
|
|
|
|
{
|
|
|
|
int in_value = value;
|
|
|
|
|
2013-05-19 17:37:30 +03:00
|
|
|
QSlider *ob = (QSlider *)QObject::sender();
|
2011-11-09 19:35:53 +01:00
|
|
|
|
2013-05-19 17:37:30 +03:00
|
|
|
if (!ob) {
|
|
|
|
return;
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
|
|
|
|
// update the label
|
2014-05-13 22:52:10 +02:00
|
|
|
ui.actuatorValue->setValue(value);
|
2011-11-09 19:35:53 +01:00
|
|
|
|
2014-05-08 18:23:35 +02:00
|
|
|
if (ui.actuatorLink->checkState() && parent()) {
|
|
|
|
// the channel is linked to other channels
|
2013-05-19 17:37:30 +03:00
|
|
|
QList<OutputChannelForm *> outputChannelForms = parent()->findChildren<OutputChannelForm *>();
|
2011-11-09 19:35:53 +01:00
|
|
|
// set the linked channels of the parent widget to the same value
|
2013-05-19 17:37:30 +03:00
|
|
|
foreach(OutputChannelForm * outputChannelForm, outputChannelForms) {
|
|
|
|
if (this == outputChannelForm) {
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if (!outputChannelForm->ui.actuatorLink->checkState()) {
|
|
|
|
continue;
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
|
|
|
|
int val = in_value;
|
2013-05-19 17:37:30 +03:00
|
|
|
if (val < outputChannelForm->ui.actuatorNeutral->minimum()) {
|
2011-11-09 19:35:53 +01:00
|
|
|
val = outputChannelForm->ui.actuatorNeutral->minimum();
|
2013-05-19 17:37:30 +03:00
|
|
|
}
|
|
|
|
if (val > outputChannelForm->ui.actuatorNeutral->maximum()) {
|
2011-11-09 19:35:53 +01:00
|
|
|
val = outputChannelForm->ui.actuatorNeutral->maximum();
|
2013-05-19 17:37:30 +03:00
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
|
2013-05-19 17:37:30 +03:00
|
|
|
if (outputChannelForm->ui.actuatorNeutral->value() == val) {
|
|
|
|
continue;
|
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
|
|
|
|
outputChannelForm->ui.actuatorNeutral->setValue(val);
|
2014-05-13 22:52:10 +02:00
|
|
|
outputChannelForm->ui.actuatorValue->setValue(val);
|
2011-11-09 19:35:53 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-05-19 17:37:30 +03:00
|
|
|
if (!m_inChannelTest) {
|
2014-05-08 18:23:35 +02:00
|
|
|
// we are not in Test Output mode
|
|
|
|
return;
|
2013-05-19 17:37:30 +03:00
|
|
|
}
|
2011-11-09 19:35:53 +01:00
|
|
|
emit channelChanged(index(), value);
|
|
|
|
}
|
2015-02-18 00:34:38 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Returns MixerType
|
|
|
|
*/
|
|
|
|
QString OutputChannelForm::outputMixerType()
|
|
|
|
{
|
|
|
|
UAVDataObject *mixer = dynamic_cast<UAVDataObject *>(getObjectManager()->getObject(QString("MixerSettings")));
|
|
|
|
|
|
|
|
Q_ASSERT(mixer);
|
|
|
|
|
|
|
|
QString mixerNumType = QString("Mixer%1Type").arg(index() + 1);
|
|
|
|
UAVObjectField *field = mixer->getField(mixerNumType);
|
|
|
|
Q_ASSERT(field);
|
|
|
|
QString mixerType = field->getValue().toString();
|
|
|
|
|
|
|
|
return mixerType;
|
|
|
|
}
|