Merge remote-tracking branch 'origin/next' into TaranisPlus
Conflicts: companion/src/generaledit.cpp companion/src/generaledit.ui radio/src/gui/menu_general.cpp
This commit is contained in:
@@ -386,6 +386,10 @@ void Curves::onNodeMoved(int x, int y)
|
||||
model.curves[currentCurve].points[index].y = y;
|
||||
spnx[index]->setValue(x);
|
||||
spny[index]->setValue(y);
|
||||
if (index > 0)
|
||||
spnx[index-1]->setMaximum(x);
|
||||
if (index < model.curves[currentCurve].count-1)
|
||||
spnx[index+1]->setMinimum(x);
|
||||
emit modified();
|
||||
lock = false;
|
||||
}
|
||||
|
||||
@@ -339,8 +339,14 @@ void CustomFunctionsPanel::refreshCustomFunction(int i, bool modified)
|
||||
if (modified) model.funcSw[i].param = fswtchParam[i]->value();
|
||||
fswtchParam[i]->setDecimals(0);
|
||||
fswtchParam[i]->setSingleStep(1);
|
||||
fswtchParam[i]->setMinimum(-125);
|
||||
fswtchParam[i]->setMaximum(125);
|
||||
if (IS_ARM(GetEepromInterface()->getBoard())) {
|
||||
fswtchParam[i]->setMinimum(-500);
|
||||
fswtchParam[i]->setMaximum(500);
|
||||
}
|
||||
else {
|
||||
fswtchParam[i]->setMinimum(-125);
|
||||
fswtchParam[i]->setMaximum(125);
|
||||
}
|
||||
fswtchParam[i]->setValue(model.funcSw[i].param);
|
||||
widgetsMask |= CUSTOM_FUNCTION_NUMERIC_PARAM;
|
||||
}
|
||||
@@ -676,7 +682,7 @@ void CustomFunctionsPanel::populateFuncParamCB(QComboBox *b, const ModelData & m
|
||||
else if (function>=FuncAdjustGV1 && function<=FuncAdjustGVLast) {
|
||||
switch (adjustmode) {
|
||||
case 1:
|
||||
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_TRIMS|POPULATE_SWITCHES);
|
||||
populateSourceCB(b, RawSource(value), model, POPULATE_SOURCES|POPULATE_VIRTUAL_INPUTS|POPULATE_TRIMS|POPULATE_SWITCHES);
|
||||
break;
|
||||
case 2:
|
||||
populateSourceCB(b, RawSource(value), model, POPULATE_GVARS);
|
||||
|
||||
@@ -29,7 +29,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
|
||||
|
||||
ui->sideCB->setCurrentIndex(ed->mode-1);
|
||||
|
||||
if (!firmware->getCapability(FlightPhases)) {
|
||||
if (!firmware->getCapability(FlightModes)) {
|
||||
ui->label_phases->hide();
|
||||
for (int i=0; i<9; i++) {
|
||||
lb_fp[i]->hide();
|
||||
@@ -44,7 +44,7 @@ ExpoDialog::ExpoDialog(QWidget *parent, ModelData & model, ExpoData *expoData, G
|
||||
}
|
||||
mask <<= 1;
|
||||
}
|
||||
for (int i=firmware->getCapability(FlightPhases); i<9;i++) {
|
||||
for (int i=firmware->getCapability(FlightModes); i<9;i++) {
|
||||
lb_fp[i]->hide();
|
||||
cb_fp[i]->hide();
|
||||
}
|
||||
@@ -154,11 +154,11 @@ void ExpoDialog::valuesChanged()
|
||||
ed->phases<<=1;
|
||||
}
|
||||
ed->phases>>=1;
|
||||
if (firmware->getCapability(FlightPhases)) {
|
||||
if (firmware->getCapability(FlightModes)) {
|
||||
int zeros=0;
|
||||
int ones=0;
|
||||
int phtemp=ed->phases;
|
||||
for (int i=0; i<firmware->getCapability(FlightPhases); i++) {
|
||||
for (int i=0; i<firmware->getCapability(FlightModes); i++) {
|
||||
if (phtemp & 1) {
|
||||
ones++;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ void ExpoDialog::valuesChanged()
|
||||
}
|
||||
if (zeros==1) {
|
||||
phtemp=ed->phases;
|
||||
for (int i=0; i<firmware->getCapability(FlightPhases); i++) {
|
||||
for (int i=0; i<firmware->getCapability(FlightModes); i++) {
|
||||
if ((phtemp & 1)==0) {
|
||||
break;
|
||||
}
|
||||
@@ -178,7 +178,7 @@ void ExpoDialog::valuesChanged()
|
||||
}
|
||||
else if (ones==1) {
|
||||
phtemp=ed->phases;
|
||||
for (int i=0; i<firmware->getCapability(FlightPhases); i++) {
|
||||
for (int i=0; i<firmware->getCapability(FlightModes); i++) {
|
||||
if (phtemp & 1) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include <QComboBox>
|
||||
#include <QGridLayout>
|
||||
|
||||
FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, GeneralSettings & generalSettings, FirmwareInterface * firmware):
|
||||
FlightModePanel::FlightModePanel(QWidget * parent, ModelData & model, int phaseIdx, GeneralSettings & generalSettings, FirmwareInterface * firmware):
|
||||
ModelPanel(parent, model, generalSettings, firmware),
|
||||
ui(new Ui::FlightMode),
|
||||
phaseIdx(phaseIdx),
|
||||
@@ -16,7 +16,7 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
int modesCount = firmware->getCapability(FlightPhases);
|
||||
int modesCount = firmware->getCapability(FlightModes);
|
||||
|
||||
// Phase name
|
||||
QRegExp rx(CHAR_FOR_NAMES_REGEX);
|
||||
@@ -39,7 +39,7 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera
|
||||
}
|
||||
|
||||
// FadeIn / FadeOut
|
||||
if (firmware->getCapability(FlightPhasesHaveFades)) {
|
||||
if (firmware->getCapability(FlightModesHaveFades)) {
|
||||
int scale = firmware->getCapability(SlowScale);
|
||||
int range = firmware->getCapability(SlowRange);
|
||||
ui->fadeIn->setMaximum(float(range)/scale);
|
||||
@@ -158,7 +158,7 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera
|
||||
gvLayout->addWidget(gvValues[i], i, col++, 1, 1);
|
||||
|
||||
// Popups
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard()) && (phaseIdx == 0)) {
|
||||
gvPopups[i] = new QCheckBox(ui->gvGB);
|
||||
gvPopups[i]->setProperty("index", i);
|
||||
gvPopups[i]->setText(tr("Popup enabled"));
|
||||
@@ -174,12 +174,12 @@ FlightMode::FlightMode(QWidget * parent, ModelData & model, int phaseIdx, Genera
|
||||
update();
|
||||
}
|
||||
|
||||
FlightMode::~FlightMode()
|
||||
FlightModePanel::~FlightModePanel()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FlightMode::update()
|
||||
void FlightModePanel::update()
|
||||
{
|
||||
ui->name->setText(phase.name);
|
||||
|
||||
@@ -205,7 +205,7 @@ void FlightMode::update()
|
||||
gvValues[i]->setDisabled(false);
|
||||
int idx = phase.gvars[i];
|
||||
PhaseData *phasegvar = &phase;
|
||||
while (idx >= 1024) {
|
||||
while (idx > 1024) {
|
||||
idx -= 1025;
|
||||
phasegvar = &model.phaseData[idx];
|
||||
idx = phasegvar->gvars[i];
|
||||
@@ -213,7 +213,8 @@ void FlightMode::update()
|
||||
}
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
gvValues[i]->setValue(phasegvar->gvars[i]);
|
||||
gvPopups[i]->setChecked(model.gvars_popups[i]);
|
||||
if (phaseIdx == 0)
|
||||
gvPopups[i]->setChecked(model.gvars_popups[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +222,7 @@ void FlightMode::update()
|
||||
reValues[i]->setDisabled(false);
|
||||
int idx = phase.rotaryEncoders[i];
|
||||
PhaseData *phasere = &phase;
|
||||
while (idx >= 1024) {
|
||||
while (idx > 1024) {
|
||||
idx -= 1025;
|
||||
phasere = &model.phaseData[idx];
|
||||
idx = phasere->rotaryEncoders[i];
|
||||
@@ -231,7 +232,7 @@ void FlightMode::update()
|
||||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseName_editingFinished()
|
||||
void FlightModePanel::phaseName_editingFinished()
|
||||
{
|
||||
QLineEdit *lineEdit = qobject_cast<QLineEdit*>(sender());
|
||||
strcpy(phase.name, lineEdit->text().toAscii());
|
||||
@@ -239,14 +240,14 @@ void FlightMode::phaseName_editingFinished()
|
||||
emit nameModified();
|
||||
}
|
||||
|
||||
void FlightMode::phaseSwitch_currentIndexChanged(int index)
|
||||
void FlightModePanel::phaseSwitch_currentIndexChanged(int index)
|
||||
{
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
phase.swtch = RawSwitch(comboBox->itemData(index).toInt());
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void FlightMode::phaseFadeIn_editingFinished()
|
||||
void FlightModePanel::phaseFadeIn_editingFinished()
|
||||
{
|
||||
QDoubleSpinBox *spinBox = qobject_cast<QDoubleSpinBox*>(sender());
|
||||
int scale = firmware->getCapability(SlowScale);
|
||||
@@ -254,7 +255,7 @@ void FlightMode::phaseFadeIn_editingFinished()
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void FlightMode::phaseFadeOut_editingFinished()
|
||||
void FlightModePanel::phaseFadeOut_editingFinished()
|
||||
{
|
||||
QDoubleSpinBox *spinBox = qobject_cast<QDoubleSpinBox*>(sender());
|
||||
int scale = firmware->getCapability(SlowScale);
|
||||
@@ -262,7 +263,7 @@ void FlightMode::phaseFadeOut_editingFinished()
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void FlightMode::trimUpdate(unsigned int trim)
|
||||
void FlightModePanel::trimUpdate(unsigned int trim)
|
||||
{
|
||||
lock = true;
|
||||
int chn = CONVERT_MODE(trim+1)-1;
|
||||
@@ -282,7 +283,7 @@ void FlightMode::trimUpdate(unsigned int trim)
|
||||
lock = false;
|
||||
}
|
||||
|
||||
void FlightMode::phaseGVValue_editingFinished()
|
||||
void FlightModePanel::phaseGVValue_editingFinished()
|
||||
{
|
||||
if (!lock) {
|
||||
QSpinBox *spinBox = qobject_cast<QSpinBox*>(sender());
|
||||
@@ -292,7 +293,7 @@ void FlightMode::phaseGVValue_editingFinished()
|
||||
}
|
||||
}
|
||||
|
||||
void FlightMode::GVName_editingFinished()
|
||||
void FlightModePanel::GVName_editingFinished()
|
||||
{
|
||||
if (!lock) {
|
||||
QLineEdit *lineedit = qobject_cast<QLineEdit*>(sender());
|
||||
@@ -303,7 +304,7 @@ void FlightMode::GVName_editingFinished()
|
||||
}
|
||||
}
|
||||
|
||||
void FlightMode::GVSource_currentIndexChanged(int index)
|
||||
void FlightModePanel::GVSource_currentIndexChanged(int index)
|
||||
{
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
int gvar = comboBox->property("index").toInt();
|
||||
@@ -311,7 +312,7 @@ void FlightMode::GVSource_currentIndexChanged(int index)
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void FlightMode::phaseGVUse_currentIndexChanged(int index)
|
||||
void FlightModePanel::phaseGVUse_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
lock = true;
|
||||
@@ -321,7 +322,7 @@ void FlightMode::phaseGVUse_currentIndexChanged(int index)
|
||||
phase.gvars[gvar]=0;
|
||||
}
|
||||
else {
|
||||
phase.gvars[gvar] = 1024+index;
|
||||
phase.gvars[gvar] = 1024+index+(index>phaseIdx?1:0);
|
||||
}
|
||||
update();
|
||||
emit modified();
|
||||
@@ -329,14 +330,14 @@ void FlightMode::phaseGVUse_currentIndexChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseGVPopupToggled(bool checked)
|
||||
void FlightModePanel::phaseGVPopupToggled(bool checked)
|
||||
{
|
||||
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());
|
||||
int gvar = cb->property("index").toInt();
|
||||
model.gvars_popups[gvar] = checked;
|
||||
}
|
||||
|
||||
void FlightMode::phaseREValue_editingFinished()
|
||||
void FlightModePanel::phaseREValue_editingFinished()
|
||||
{
|
||||
if (!lock) {
|
||||
QSpinBox *spinBox = qobject_cast<QSpinBox*>(sender());
|
||||
@@ -346,7 +347,7 @@ void FlightMode::phaseREValue_editingFinished()
|
||||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseREUse_currentIndexChanged(int index)
|
||||
void FlightModePanel::phaseREUse_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
lock = true;
|
||||
@@ -364,7 +365,7 @@ void FlightMode::phaseREUse_currentIndexChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseTrimUse_currentIndexChanged(int index)
|
||||
void FlightModePanel::phaseTrimUse_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
QComboBox *comboBox = qobject_cast<QComboBox*>(sender());
|
||||
@@ -386,7 +387,7 @@ void FlightMode::phaseTrimUse_currentIndexChanged(int index)
|
||||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseTrim_valueChanged()
|
||||
void FlightModePanel::phaseTrim_valueChanged()
|
||||
{
|
||||
if (!lock) {
|
||||
QSpinBox *spinBox = qobject_cast<QSpinBox*>(sender());
|
||||
@@ -401,7 +402,7 @@ void FlightMode::phaseTrim_valueChanged()
|
||||
}
|
||||
}
|
||||
|
||||
void FlightMode::phaseTrimSlider_valueChanged()
|
||||
void FlightModePanel::phaseTrimSlider_valueChanged()
|
||||
{
|
||||
if (!lock) {
|
||||
QSlider *slider = qobject_cast<QSlider*>(sender());
|
||||
@@ -418,14 +419,14 @@ void FlightMode::phaseTrimSlider_valueChanged()
|
||||
|
||||
/**********************************************************/
|
||||
|
||||
FlightModes::FlightModes(QWidget * parent, ModelData & model, GeneralSettings & generalSettings, FirmwareInterface * firmware):
|
||||
FlightModesPanel::FlightModesPanel(QWidget * parent, ModelData & model, GeneralSettings & generalSettings, FirmwareInterface * firmware):
|
||||
ModelPanel(parent, model, generalSettings, firmware),
|
||||
modesCount(firmware->getCapability(FlightPhases))
|
||||
modesCount(firmware->getCapability(FlightModes))
|
||||
{
|
||||
QGridLayout * gridLayout = new QGridLayout(this);
|
||||
tabWidget = new QTabWidget(this);
|
||||
for (int i=0; i<modesCount; i++) {
|
||||
FlightMode *tab = new FlightMode(tabWidget, model, i, generalSettings, firmware);
|
||||
FlightModePanel *tab = new FlightModePanel(tabWidget, model, i, generalSettings, firmware);
|
||||
tab->setProperty("index", i);
|
||||
panels << tab;
|
||||
connect(tab, SIGNAL(modified()), this, SLOT(onPhaseModified()));
|
||||
@@ -436,16 +437,16 @@ FlightModes::FlightModes(QWidget * parent, ModelData & model, GeneralSettings &
|
||||
connect(tabWidget, SIGNAL(currentChanged(int)), this, SLOT(on_tabWidget_currentChanged(int)));
|
||||
}
|
||||
|
||||
FlightModes::~FlightModes()
|
||||
FlightModesPanel::~FlightModesPanel()
|
||||
{
|
||||
}
|
||||
|
||||
void FlightModes::onPhaseModified()
|
||||
void FlightModesPanel::onPhaseModified()
|
||||
{
|
||||
emit modified();
|
||||
}
|
||||
|
||||
QString FlightModes::getTabName(int index)
|
||||
QString FlightModesPanel::getTabName(int index)
|
||||
{
|
||||
QString result = tr("Flight Mode %1").arg(index);
|
||||
const char *name = model.phaseData[index].name;
|
||||
@@ -459,18 +460,18 @@ QString FlightModes::getTabName(int index)
|
||||
return result;
|
||||
}
|
||||
|
||||
void FlightModes::onPhaseNameChanged()
|
||||
void FlightModesPanel::onPhaseNameChanged()
|
||||
{
|
||||
int index = sender()->property("index").toInt();
|
||||
tabWidget->setTabText(index, getTabName(index));
|
||||
}
|
||||
|
||||
void FlightModes::update()
|
||||
void FlightModesPanel::update()
|
||||
{
|
||||
on_tabWidget_currentChanged(tabWidget->currentIndex());
|
||||
}
|
||||
|
||||
void FlightModes::on_tabWidget_currentChanged(int index)
|
||||
void FlightModesPanel::on_tabWidget_currentChanged(int index)
|
||||
{
|
||||
panels[index]->update();
|
||||
}
|
||||
|
||||
@@ -13,13 +13,13 @@ namespace Ui {
|
||||
class FlightMode;
|
||||
}
|
||||
|
||||
class FlightMode : public ModelPanel
|
||||
class FlightModePanel : public ModelPanel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FlightMode(QWidget *parent, ModelData &model, int modeIdx, GeneralSettings & generalSettings, FirmwareInterface * firmware);
|
||||
virtual ~FlightMode();
|
||||
FlightModePanel(QWidget *parent, ModelData &model, int modeIdx, GeneralSettings & generalSettings, FirmwareInterface * firmware);
|
||||
virtual ~FlightModePanel();
|
||||
|
||||
virtual void update();
|
||||
|
||||
@@ -61,13 +61,13 @@ class FlightMode : public ModelPanel
|
||||
|
||||
};
|
||||
|
||||
class FlightModes : public ModelPanel
|
||||
class FlightModesPanel : public ModelPanel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FlightModes(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, FirmwareInterface * firmware);
|
||||
virtual ~FlightModes();
|
||||
FlightModesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, FirmwareInterface * firmware);
|
||||
virtual ~FlightModesPanel();
|
||||
|
||||
virtual void update();
|
||||
|
||||
@@ -80,7 +80,7 @@ class FlightModes : public ModelPanel
|
||||
int modesCount;
|
||||
QTabWidget *tabWidget;
|
||||
QString getTabName(int index);
|
||||
QVector<FlightMode *> panels;
|
||||
QVector<FlightModePanel *> panels;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -144,27 +144,17 @@ QString InputsPanel::getInputText(int dest, bool * new_ch)
|
||||
if ((dest == 0) || (model.expoData[dest-1].chn != md->chn)) {
|
||||
if (new_ch) *new_ch = 1;
|
||||
if (firmware->getCapability(VirtualInputs))
|
||||
str = QString("%1").arg(getInputStr(model, md->chn), -8, ' ');
|
||||
str = QString("%1").arg(getInputStr(model, md->chn), -10, ' ');
|
||||
else
|
||||
str = getInputStr(model, md->chn);
|
||||
}
|
||||
else {
|
||||
if (firmware->getCapability(VirtualInputs))
|
||||
str = " ";
|
||||
str = " ";
|
||||
else
|
||||
str = " ";
|
||||
}
|
||||
|
||||
if (firmware->getCapability(VirtualInputs)) {
|
||||
str += " " + tr("Source(%1)").arg(md->srcRaw.toString());
|
||||
if (md->carryTrim>0) {
|
||||
str += " " + tr("No Trim");
|
||||
}
|
||||
else if (md->carryTrim<0) {
|
||||
str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString();
|
||||
}
|
||||
}
|
||||
|
||||
switch (md->mode) {
|
||||
case (1): str += " <-"; break;
|
||||
case (2): str += " ->"; break;
|
||||
@@ -173,7 +163,17 @@ QString InputsPanel::getInputText(int dest, bool * new_ch)
|
||||
|
||||
str += " " + tr("Weight(%1)").arg(getGVarString(md->weight));
|
||||
|
||||
if (md->curve.value) str += " " + md->curve.toString();
|
||||
if (firmware->getCapability(VirtualInputs)) {
|
||||
str += " " + tr("Source(%1)").arg(md->srcRaw.toString());
|
||||
if (md->carryTrim>0) {
|
||||
str += " " + tr("NoTrim");
|
||||
}
|
||||
else if (md->carryTrim<0) {
|
||||
str += " " + RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString();
|
||||
}
|
||||
}
|
||||
|
||||
if (md->curve.value) str += " " + Qt::escape(md->curve.toString());
|
||||
|
||||
QString phasesStr = getPhasesStr(md->phases, model);
|
||||
if (!phasesStr.isEmpty()) str += " " + phasesStr;
|
||||
|
||||
@@ -55,7 +55,7 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, G
|
||||
ui->mixerName->setValidator(new QRegExpValidator(rx, this));
|
||||
ui->mixerName->setText(md->name);
|
||||
|
||||
if (!firmware->getCapability(FlightPhases)) {
|
||||
if (!firmware->getCapability(FlightModes)) {
|
||||
ui->label_phases->hide();
|
||||
for (int i=0; i<9; i++) {
|
||||
lb_fp[i]->hide();
|
||||
@@ -70,7 +70,7 @@ MixerDialog::MixerDialog(QWidget *parent, ModelData & model, MixData *mixdata, G
|
||||
}
|
||||
mask <<= 1;
|
||||
}
|
||||
for (int i=firmware->getCapability(FlightPhases); i<9;i++) {
|
||||
for (int i=firmware->getCapability(FlightModes); i<9;i++) {
|
||||
lb_fp[i]->hide();
|
||||
cb_fp[i]->hide();
|
||||
}
|
||||
|
||||
@@ -170,6 +170,10 @@ QString MixesPanel::getMixerText(int dest, bool * new_ch)
|
||||
default: str += " "; break;
|
||||
};
|
||||
|
||||
//set mixer src model if it is unset (srcRaw needs this to generate proper toString() for input source type)
|
||||
if (md->srcRaw.model == 0)
|
||||
md->srcRaw.model = &model;
|
||||
|
||||
//highlight source if needed
|
||||
if ( (md->srcRaw.type == SOURCE_TYPE_CH) && (md->srcRaw.index+1 == (int)highlightedSource) ) {
|
||||
str += " <b>" + Qt::escape(md->srcRaw.toString()) + "</b>";
|
||||
@@ -187,11 +191,8 @@ QString MixesPanel::getMixerText(int dest, bool * new_ch)
|
||||
str += " " + Qt::escape(tr("Switch(%1)").arg(md->swtch.toString()));
|
||||
}
|
||||
|
||||
if (md->carryTrim>0) {
|
||||
str += " " + Qt::escape(tr("No Trim"));
|
||||
}
|
||||
else if (md->carryTrim<0) {
|
||||
str += " " + Qt::escape(RawSource(SOURCE_TYPE_TRIM, (-(md->carryTrim)-1)).toString());
|
||||
if (md->carryTrim) {
|
||||
str += " " + Qt::escape(tr("NoTrim"));
|
||||
}
|
||||
|
||||
if (md->noExpo) str += " " + Qt::escape(tr("No DR/Expo"));
|
||||
@@ -210,7 +211,7 @@ QString MixesPanel::getMixerText(int dest, bool * new_ch)
|
||||
QString MixerName;
|
||||
MixerName.append(md->name);
|
||||
if (!MixerName.isEmpty()) {
|
||||
str += Qt::escape(QString("(%1)").arg(MixerName));
|
||||
str += " " + Qt::escape(QString("(%1)").arg(MixerName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ ModelEdit::ModelEdit(QWidget * parent, RadioData & radioData, int modelId, Firmw
|
||||
SetupPanel * setupPanel = new SetupPanel(this, model, generalSettings, firmware);
|
||||
addTab(setupPanel, tr("Setup"));
|
||||
addTab(new HeliPanel(this, model, generalSettings, firmware), tr("Heli"));
|
||||
addTab(new FlightModes(this, model, generalSettings, firmware), tr("Flight Modes"));
|
||||
addTab(new FlightModesPanel(this, model, generalSettings, firmware), tr("Flight Modes"));
|
||||
addTab(new InputsPanel(this, model, generalSettings, firmware), tr("Inputs"));
|
||||
addTab(new MixesPanel(this, model, generalSettings, firmware), tr("Mixes"));
|
||||
Channels * chnPanel = new Channels(this, model, generalSettings, firmware);
|
||||
|
||||
Reference in New Issue
Block a user