QGCParamSlider.cc 18.8 KB
Newer Older
1 2
#include <QMenu>
#include <QContextMenuEvent>
3
#include <QSettings>
4
#include <QTimer>
Lorenz Meier's avatar
Lorenz Meier committed
5
#include <QToolTip>
Don Gagne's avatar
Don Gagne committed
6
#include <QDebug>
7

8 9
#include "QGCParamSlider.h"
#include "ui_QGCParamSlider.h"
10
#include "UASInterface.h"
11
#include "UASManager.h"
12

13

14
QGCParamSlider::QGCParamSlider(QWidget *parent) :
15 16 17 18 19 20
    QGCToolWidgetItem("Slider", parent),
    parameterName(""),
    parameterValue(0.0f),
    parameterScalingFactor(0.0),
    parameterMin(0.0f),
    parameterMax(0.0f),
21
    componentId(0),
22 23
    ui(new Ui::QGCParamSlider)
{
24
    valueModLock = false;
25
    visibleEnabled = true;
26
    valueModLockParam = false;
27
    ui->setupUi(this);
28
    ui->intValueSpinBox->hide();
29 30
    ui->valueSlider->setEnabled(false);
    ui->doubleValueSpinBox->setEnabled(false);
31
    uas = NULL;
pixhawk's avatar
pixhawk committed
32 33 34

    scaledInt = ui->valueSlider->maximum() - ui->valueSlider->minimum();

35
    ui->editInfoCheckBox->hide();
36 37 38 39 40 41 42 43
    ui->editDoneButton->hide();
    ui->editNameLabel->hide();
    ui->editRefreshParamsButton->hide();
    ui->editSelectParamComboBox->hide();
    ui->editSelectComponentComboBox->hide();
    ui->editStatusLabel->hide();
    ui->editMinSpinBox->hide();
    ui->editMaxSpinBox->hide();
44 45
    ui->editLine1->hide();
    ui->editLine2->hide();
46
    ui->infoLabel->hide();
47

pixhawk's avatar
pixhawk committed
48
    connect(ui->editDoneButton, SIGNAL(clicked()), this, SLOT(endEditMode()));
49 50

    // Sending actions
51 52 53 54 55 56 57 58 59 60 61 62 63 64
    connect(ui->writeButton, SIGNAL(clicked()),
            this, SLOT(setParamPending()));
    connect(ui->editSelectComponentComboBox, SIGNAL(currentIndexChanged(int)),
            this, SLOT(selectComponent(int)));
    connect(ui->editSelectParamComboBox, SIGNAL(currentIndexChanged(int)),
            this, SLOT(selectParameter(int)));
    connect(ui->valueSlider, SIGNAL(valueChanged(int)),
            this, SLOT(setSliderValue(int)));
    connect(ui->doubleValueSpinBox, SIGNAL(valueChanged(double)),
            this, SLOT(setParamValue(double)));
    connect(ui->intValueSpinBox, SIGNAL(valueChanged(int)),
            this, SLOT(setParamValue(int)));
    connect(ui->editNameLabel, SIGNAL(textChanged(QString)),
            ui->nameLabel, SLOT(setText(QString)));
65
    connect(ui->readButton, SIGNAL(clicked()), this, SLOT(requestParameter()));
66 67 68 69
    connect(ui->editRefreshParamsButton, SIGNAL(clicked()),
            this, SLOT(refreshParamList()));
    connect(ui->editInfoCheckBox, SIGNAL(clicked(bool)),
            this, SLOT(showInfo(bool)));
Lorenz Meier's avatar
Lorenz Meier committed
70
    // connect to self
71 72
    connect(ui->infoLabel, SIGNAL(released()),
            this, SLOT(showTooltip()));
73 74 75

    init();
    requestParameter();
76 77 78 79 80 81 82
}

QGCParamSlider::~QGCParamSlider()
{
    delete ui;
}

Lorenz Meier's avatar
Lorenz Meier committed
83 84 85 86 87 88
void QGCParamSlider::showTooltip()
{
    QWidget* sender = dynamic_cast<QWidget*>(QObject::sender());

    if (sender)
    {
89
        QPoint point = mapToGlobal(ui->infoLabel->pos());
Lorenz Meier's avatar
Lorenz Meier committed
90 91 92 93
        QToolTip::showText(point, sender->toolTip());
    }
}

94 95 96 97
void QGCParamSlider::refreshParamList()
{
    ui->editSelectParamComboBox->setEnabled(true);
    ui->editSelectComponentComboBox->setEnabled(true);
98
    if (uas) {
99
        uas->getParamManager()->requestParameterList();
Lorenz Meier's avatar
Lorenz Meier committed
100
        ui->editStatusLabel->setText(tr("Parameter list updating.."));
101 102 103
    }
}

104 105
void QGCParamSlider::setActiveUAS(UASInterface* activeUas)
{
106

107 108 109 110
    if (uas != activeUas)  {
        if (uas) {
            disconnect(uas, SIGNAL(parameterChanged(int,int,int,int,QString,QVariant)),
                       this, SLOT(setParameterValue(int,int,int,int,QString,QVariant)));
111
        }
112 113 114
        if (activeUas) {
            connect(activeUas, SIGNAL(parameterChanged(int,int,int,int,QString,QVariant)),
                    this, SLOT(setParameterValue(int,int,int,int,QString,QVariant)), Qt::UniqueConnection);
115
        }
116
        uas = activeUas;
117
    }
118 119

    if (uas && !parameterName.isEmpty()) {
120
        QString text =  uas->getParamManager()->dataModel()->getParamDescription(parameterName);
121 122 123 124 125 126 127 128 129 130 131
        if (!text.isEmpty()) {
            ui->infoLabel->setToolTip(text);
            ui->infoLabel->show();
        }
        // Force-uncheck and hide label if no description is available
        if (ui->editInfoCheckBox->isChecked()) {
            showInfo((text.length() > 0));
        }
    }


132 133 134 135
}

void QGCParamSlider::requestParameter()
{
136
    if (uas && !parameterName.isEmpty()) {
137
        uas->getParamManager()->requestParameterUpdate(componentId, parameterName);
138 139 140
    }
}

141 142 143 144 145 146
void QGCParamSlider::showInfo(bool enable)
{
    ui->editInfoCheckBox->setChecked(enable);
    ui->infoLabel->setVisible(enable);
}

147 148
void QGCParamSlider::setParamValue(double value)
{
149
    parameterValue = (float)value;
150 151 152 153 154 155 156 157 158 159 160
     //disconnect(ui->valueSlider,SIGNAL(valueChanged(int)));
    if (!valueModLock && !valueModLockParam)
    {
        valueModLock = true;
        ui->valueSlider->setValue(floatToScaledInt(value));
    }
    else
    {
        valueModLock = false;
    }
    //connect(ui->valueSlider, SIGNAL(valueChanged(int)), this, SLOT(setSliderValue(int)));
161 162
}

163 164 165
void QGCParamSlider::setParamValue(int value)
{
    parameterValue = value;
166 167 168 169 170 171 172 173 174 175 176
    // disconnect(ui->valueSlider,SIGNAL(valueChanged(int)));
    if (!valueModLock && !valueModLockParam)
    {
        valueModLock = true;
        ui->valueSlider->setValue(floatToScaledInt(value));
    }
    else
    {
        valueModLock = false;
    }
    //connect(ui->valueSlider, SIGNAL(valueChanged(int)), this, SLOT(setSliderValue(int)));
177 178
}

179 180
void QGCParamSlider::selectComponent(int componentIndex)
{
181
    this->componentId = ui->editSelectComponentComboBox->itemData(componentIndex).toInt();
182 183 184 185
}

void QGCParamSlider::selectParameter(int paramIndex)
{
LM's avatar
LM committed
186
    // Set name
187
    parameterName = ui->editSelectParamComboBox->itemText(paramIndex);
tstellanova's avatar
tstellanova committed
188 189 190
    if (parameterName.isEmpty()) {
        return;
    }
LM's avatar
LM committed
191 192

    // Update min and max values if available
193
    if (uas) {
194
        UASParameterDataModel* dataModel =  uas->getParamManager()->dataModel();
195
        if (dataModel) {
LM's avatar
LM committed
196
            // Minimum
197 198
            if (dataModel->isParamMinKnown(parameterName)) {
                parameterMin = dataModel->getParamMin(parameterName);
LM's avatar
LM committed
199 200 201 202
                ui->editMinSpinBox->setValue(parameterMin);
            }

            // Maximum
203 204
            if (dataModel->isParamMaxKnown(parameterName)) {
                parameterMax = dataModel->getParamMax(parameterName);
LM's avatar
LM committed
205 206 207 208
                ui->editMaxSpinBox->setValue(parameterMax);
            }
        }
    }
209 210
}

211
void QGCParamSlider::setEditMode(bool editMode)
212
{
213 214 215
    if(!editMode) {
        // Store component id
        selectComponent(ui->editSelectComponentComboBox->currentIndex());
216

217 218
        // Store parameter name and id
        selectParameter(ui->editSelectParamComboBox->currentIndex());
219

220 221 222
        // Min/max
        parameterMin = ui->editMinSpinBox->value();
        parameterMax = ui->editMaxSpinBox->value();
223

224 225
        requestParameter();

226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
        switch ((int)parameterValue.type())
        {
        case QVariant::Char:
        case QVariant::Int:
        case QVariant::UInt:
            ui->intValueSpinBox->show();
            break;
        case QMetaType::Float:
            ui->doubleValueSpinBox->show();
            break;
        default:
            qCritical() << "ERROR: NO VALID PARAM TYPE";
            return;
        }
    } else {
        ui->doubleValueSpinBox->hide();
        ui->intValueSpinBox->hide();
243
    }
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
    ui->valueSlider->setVisible(!editMode);
    ui->nameLabel->setVisible(!editMode);
    ui->writeButton->setVisible(!editMode);
    ui->readButton->setVisible(!editMode);

    ui->editInfoCheckBox->setVisible(editMode);
    ui->editDoneButton->setVisible(editMode);
    ui->editNameLabel->setVisible(editMode);
    ui->editRefreshParamsButton->setVisible(editMode);
    ui->editSelectParamComboBox->setVisible(editMode);
    ui->editSelectComponentComboBox->setVisible(editMode);
    ui->editStatusLabel->setVisible(editMode);
    ui->editMinSpinBox->setVisible(editMode);
    ui->editMaxSpinBox->setVisible(editMode);
    ui->writeButton->setVisible(!editMode);
    ui->readButton->setVisible(!editMode);
    ui->editLine1->setVisible(editMode);
    ui->editLine2->setVisible(editMode);

    QGCToolWidgetItem::setEditMode(editMode);
264 265
}

266
void QGCParamSlider::setParamPending()
267
{
268
    if (uas)  {
269
        uas->getParamManager()->setPendingParam(componentId, parameterName, parameterValue);
270
        uas->getParamManager()->sendPendingParameters(true, true);
271
    }
272
    else {
273
        qDebug() << __FILE__ << __LINE__ << "NO UAS SET, DOING NOTHING";
274 275 276
    }
}

pixhawk's avatar
pixhawk committed
277 278
void QGCParamSlider::setSliderValue(int sliderValue)
{
279
    if (!valueModLock && !valueModLockParam)
280
    {
281
        valueModLock = true;
282
        switch ((int)parameterValue.type())
283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
        {
        case QVariant::Char:
            parameterValue = QVariant(QChar((unsigned char)scaledIntToFloat(sliderValue)));
            ui->intValueSpinBox->setValue(parameterValue.toInt());
            break;
        case QVariant::Int:
            parameterValue = (int)scaledIntToFloat(sliderValue);
            ui->intValueSpinBox->setValue(parameterValue.toInt());
            break;
        case QVariant::UInt:
            parameterValue = (unsigned int)scaledIntToFloat(sliderValue);
            ui->intValueSpinBox->setValue(parameterValue.toUInt());
            break;
        case QMetaType::Float:
            parameterValue = scaledIntToFloat(sliderValue);
            ui->doubleValueSpinBox->setValue(parameterValue.toFloat());
            break;
        default:
            qCritical() << "ERROR: NO VALID PARAM TYPE";
            valueModLock = false;
            return;
        }
    }
    else
    {
        valueModLock = false;
309
    }
pixhawk's avatar
pixhawk committed
310 311
}

312 313 314 315 316 317
/**
 * @brief uas Unmanned system sending the parameter
 * @brief component UAS component sending the parameter
 * @brief parameterName Key/name of the parameter
 * @brief value Value of the parameter
 */
318
void QGCParamSlider::setParameterValue(int uasId, int compId, int paramCount, int paramIndex, QString paramName, QVariant value)
pixhawk's avatar
pixhawk committed
319
{
320
    Q_UNUSED(paramCount);
321 322 323 324 325 326
    if (uasId != this->uas->getUASID()) {
        return;
    }

    if (ui->nameLabel->text() == "Name")  {
        ui->nameLabel->setText(paramName);
327
    }
328 329
    // Check if this component and parameter are part of the list
    bool found = false;
330 331
    for (int i = 0; i< ui->editSelectComponentComboBox->count(); ++i) {
        if (compId == ui->editSelectComponentComboBox->itemData(i).toInt()) {
332 333 334 335
            found = true;
        }
    }

336 337
    if (!found) {
        ui->editSelectComponentComboBox->addItem(tr("Component #%1").arg(compId), compId);
338 339 340 341
    }

    // Parameter checking
    found = false;
342 343
    for (int i = 0; i < ui->editSelectParamComboBox->count(); ++i) {
        if (paramName == ui->editSelectParamComboBox->itemText(i))  {
344 345 346 347
            found = true;
        }
    }

348 349
    if (!found) {
        ui->editSelectParamComboBox->addItem(paramName, paramIndex);
350 351
    }

352 353 354 355
    if (visibleParam != "") {
        if (paramName == visibleParam)  {
            if (visibleVal == value.toInt())  {
                uas->getParamManager()->requestParameterUpdate(compId,paramName);
356 357 358
                visibleEnabled = true;
                this->show();
            }
359
            else  {
360 361 362 363 364 365 366 367 368
                //Disable the component here.
                ui->valueSlider->setEnabled(false);
                ui->intValueSpinBox->setEnabled(false);
                ui->doubleValueSpinBox->setEnabled(false);
                visibleEnabled = false;
                this->hide();
            }
        }
    }
369
    Q_UNUSED(uas);
370
    if (compId == this->componentId && paramName == this->parameterName) {
371
        if (!visibleEnabled) {
372 373
            return;
        }
374
        parameterValue = value;
375
        ui->valueSlider->setEnabled(true);
376
        valueModLockParam = true;
377
        switch ((int)value.type())
378
        {
379 380 381 382 383
        case QVariant::Char:
            ui->intValueSpinBox->show();
            ui->intValueSpinBox->setEnabled(true);
            ui->doubleValueSpinBox->hide();
            ui->intValueSpinBox->setValue(value.toUInt());
384
            ui->intValueSpinBox->setRange(0, UINT8_MAX);
385 386
            if (parameterMax == 0 && parameterMin == 0)
            {
387
                ui->editMaxSpinBox->setValue(UINT8_MAX);
388 389
                ui->editMinSpinBox->setValue(0);
            }
390
            ui->valueSlider->setValue(floatToScaledInt(value.toUInt()));
391
            break;
392 393
        case QVariant::Int:
            ui->intValueSpinBox->show();
394
            ui->intValueSpinBox->setEnabled(true);
395
            ui->doubleValueSpinBox->hide();
396
            ui->intValueSpinBox->setValue(value.toInt());
397
            ui->intValueSpinBox->setRange(INT32_MIN, INT32_MAX);
398 399
            if (parameterMax == 0 && parameterMin == 0)
            {
400 401
                ui->editMaxSpinBox->setValue(INT32_MAX);
                ui->editMinSpinBox->setValue(INT32_MIN);
402
            }
403
            ui->valueSlider->setValue(floatToScaledInt(value.toInt()));
404 405 406
            break;
        case QVariant::UInt:
            ui->intValueSpinBox->show();
407
            ui->intValueSpinBox->setEnabled(true);
408
            ui->doubleValueSpinBox->hide();
409
            ui->intValueSpinBox->setValue(value.toUInt());
410
            ui->intValueSpinBox->setRange(0, UINT32_MAX);
411 412
            if (parameterMax == 0 && parameterMin == 0)
            {
413
                ui->editMaxSpinBox->setValue(UINT32_MAX);
414 415
                ui->editMinSpinBox->setValue(0);
            }
416
            ui->valueSlider->setValue(floatToScaledInt(value.toUInt()));
417 418
            break;
        case QMetaType::Float:
419
            ui->doubleValueSpinBox->setValue(value.toFloat());
420
            ui->doubleValueSpinBox->show();
421
            ui->doubleValueSpinBox->setEnabled(true);
422
            ui->intValueSpinBox->hide();
423 424 425 426 427
            if (parameterMax == 0 && parameterMin == 0)
            {
                ui->editMaxSpinBox->setValue(10000);
                ui->editMinSpinBox->setValue(0);
            }
428
            ui->valueSlider->setValue(floatToScaledInt(value.toFloat()));
429 430 431
            break;
        default:
            qCritical() << "ERROR: NO VALID PARAM TYPE";
432
            valueModLockParam = false;
433 434
            return;
        }
435 436 437
        valueModLockParam = false;
        parameterMax = ui->editMaxSpinBox->value();
        parameterMin = ui->editMinSpinBox->value();
438
    }
Lorenz Meier's avatar
Lorenz Meier committed
439

440
    if (paramIndex == paramCount - 1) {
Lorenz Meier's avatar
Lorenz Meier committed
441 442
        ui->editStatusLabel->setText(tr("Complete parameter list received."));
    }
pixhawk's avatar
pixhawk committed
443 444
}

445 446 447 448 449 450 451 452 453 454 455
void QGCParamSlider::changeEvent(QEvent *e)
{
    QWidget::changeEvent(e);
    switch (e->type()) {
    case QEvent::LanguageChange:
        ui->retranslateUi(this);
        break;
    default:
        break;
    }
}
lm's avatar
lm committed
456

pixhawk's avatar
pixhawk committed
457
float QGCParamSlider::scaledIntToFloat(int sliderValue)
lm's avatar
lm committed
458
{
459
    float result = (((double)sliderValue)/(double)scaledInt)*(ui->editMaxSpinBox->value() - ui->editMinSpinBox->value());
460
    //qDebug() << "INT TO FLOAT: CONVERTED" << sliderValue << "TO" << result;
461
    return result;
pixhawk's avatar
pixhawk committed
462
}
lm's avatar
lm committed
463

pixhawk's avatar
pixhawk committed
464 465
int QGCParamSlider::floatToScaledInt(float value)
{
466
    int result = ((value - ui->editMinSpinBox->value())/(ui->editMaxSpinBox->value() - ui->editMinSpinBox->value()))*scaledInt;
467
    //qDebug() << "FLOAT TO INT: CONVERTED" << value << "TO" << result << "SCALEDINT" << scaledInt;
468
    return result;
lm's avatar
lm committed
469 470
}

pixhawk's avatar
pixhawk committed
471
void QGCParamSlider::writeSettings(QSettings& settings)
lm's avatar
lm committed
472
{
pixhawk's avatar
pixhawk committed
473 474 475
    settings.setValue("TYPE", "SLIDER");
    settings.setValue("QGC_PARAM_SLIDER_DESCRIPTION", ui->nameLabel->text());
    //settings.setValue("QGC_PARAM_SLIDER_BUTTONTEXT", ui->actionButton->text());
476
    settings.setValue("QGC_PARAM_SLIDER_PARAMID", parameterName);
477
    settings.setValue("QGC_PARAM_SLIDER_COMPONENTID", componentId);
pixhawk's avatar
pixhawk committed
478 479
    settings.setValue("QGC_PARAM_SLIDER_MIN", ui->editMinSpinBox->value());
    settings.setValue("QGC_PARAM_SLIDER_MAX", ui->editMaxSpinBox->value());
480
    settings.setValue("QGC_PARAM_SLIDER_DISPLAY_INFO", ui->editInfoCheckBox->isChecked());
pixhawk's avatar
pixhawk committed
481
    settings.sync();
lm's avatar
lm committed
482
}
483 484 485
void QGCParamSlider::readSettings(const QString& pre,const QVariantMap& settings)
{
    parameterName = settings.value(pre + "QGC_PARAM_SLIDER_PARAMID").toString();
486
    componentId = settings.value(pre + "QGC_PARAM_SLIDER_COMPONENTID").toInt();
487 488 489 490 491 492 493 494
    ui->nameLabel->setText(settings.value(pre + "QGC_PARAM_SLIDER_DESCRIPTION").toString());
    ui->editNameLabel->setText(settings.value(pre + "QGC_PARAM_SLIDER_DESCRIPTION").toString());
    //settings.setValue("QGC_PARAM_SLIDER_BUTTONTEXT", ui->actionButton->text());
    ui->editSelectParamComboBox->addItem(settings.value(pre + "QGC_PARAM_SLIDER_PARAMID").toString());
    ui->editSelectParamComboBox->setCurrentIndex(ui->editSelectParamComboBox->count()-1);
    ui->editSelectComponentComboBox->addItem(tr("Component #%1").arg(settings.value(pre + "QGC_PARAM_SLIDER_COMPONENTID").toInt()), settings.value(pre + "QGC_PARAM_SLIDER_COMPONENTID").toInt());
    ui->editMinSpinBox->setValue(settings.value(pre + "QGC_PARAM_SLIDER_MIN").toFloat());
    ui->editMaxSpinBox->setValue(settings.value(pre + "QGC_PARAM_SLIDER_MAX").toFloat());
495 496
    visibleParam = settings.value(pre+"QGC_PARAM_SLIDER_VISIBLE_PARAM","").toString();
    visibleVal = settings.value(pre+"QGC_PARAM_SLIDER_VISIBLE_VAL",0).toInt();
497 498 499 500
    parameterMax = ui->editMaxSpinBox->value();
    parameterMin = ui->editMinSpinBox->value();
    //ui->valueSlider->setMaximum(parameterMax);
    //ui->valueSlider->setMinimum(parameterMin);
501 502 503 504 505 506
    showInfo(settings.value(pre + "QGC_PARAM_SLIDER_DISPLAY_INFO", true).toBool());
    ui->editSelectParamComboBox->setEnabled(true);
    ui->editSelectComponentComboBox->setEnabled(true);

    setActiveUAS(UASManager::instance()->getActiveUAS());
}
lm's avatar
lm committed
507 508 509

void QGCParamSlider::readSettings(const QSettings& settings)
{
510 511 512 513 514 515 516 517
    QVariantMap map;
    foreach (QString key,settings.allKeys())
    {
        map[key] = settings.value(key);
    }

    readSettings("",map);
    return;
518
    parameterName = settings.value("QGC_PARAM_SLIDER_PARAMID").toString();
519
    componentId = settings.value("QGC_PARAM_SLIDER_COMPONENTID").toInt();
pixhawk's avatar
pixhawk committed
520
    ui->nameLabel->setText(settings.value("QGC_PARAM_SLIDER_DESCRIPTION").toString());
521
    ui->editNameLabel->setText(settings.value("QGC_PARAM_SLIDER_DESCRIPTION").toString());
pixhawk's avatar
pixhawk committed
522
    //settings.setValue("QGC_PARAM_SLIDER_BUTTONTEXT", ui->actionButton->text());
523 524
    ui->editSelectParamComboBox->addItem(settings.value("QGC_PARAM_SLIDER_PARAMID").toString());
    ui->editSelectParamComboBox->setCurrentIndex(ui->editSelectParamComboBox->count()-1);
525
    ui->editSelectComponentComboBox->addItem(tr("Component #%1").arg(settings.value("QGC_PARAM_SLIDER_COMPONENTID").toInt()), settings.value("QGC_PARAM_SLIDER_COMPONENTID").toInt());
526 527
    ui->editMinSpinBox->setValue(settings.value("QGC_PARAM_SLIDER_MIN").toFloat());
    ui->editMaxSpinBox->setValue(settings.value("QGC_PARAM_SLIDER_MAX").toFloat());
528 529 530
    visibleParam = settings.value("QGC_PARAM_SLIDER_VISIBLE_PARAM","").toString();
             //QGC_TOOL_WIDGET_ITEMS\1\QGC_PARAM_SLIDER_VISIBLE_PARAM=RC5_FUNCTION
    visibleVal = settings.value("QGC_PARAM_SLIDER_VISIBLE_VAL",0).toInt();
531 532
    parameterMax = ui->editMaxSpinBox->value();
    parameterMin = ui->editMinSpinBox->value();
533
    showInfo(settings.value("QGC_PARAM_SLIDER_DISPLAY_INFO", true).toBool());
534 535
    ui->editSelectParamComboBox->setEnabled(true);
    ui->editSelectComponentComboBox->setEnabled(true);
536 537 538

    setActiveUAS(UASManager::instance()->getActiveUAS());

lm's avatar
lm committed
539
}