OsdConfig.cc 1.44 KB
Newer Older
1
#include "OsdConfig.h"
2
#include <QMessageBox>
3

4
OsdConfig::OsdConfig(QWidget *parent) : AP2ConfigWidget(parent)
5 6
{
    ui.setupUi(this);
7
    connect(ui.enablePushButton,SIGNAL(clicked()),this,SLOT(enableButtonClicked()));
8 9 10 11 12
}

OsdConfig::~OsdConfig()
{
}
13 14 15 16 17 18 19
void OsdConfig::enableButtonClicked()
{
    if (!m_uas)
    {
        QMessageBox::information(0,tr("Error"),tr("Please connect to a MAV before attempting to set configuration"));
        return;
    }
20 21 22 23 24 25 26 27
    m_uas->getParamManager()->setParameter(1,"SR0_EXT_STAT",2);
    m_uas->getParamManager()->setParameter(1,"SR0_EXTRA1",10);
    m_uas->getParamManager()->setParameter(1,"SR0_EXTRA2",10);
    m_uas->getParamManager()->setParameter(1,"SR0_EXTRA3",2);
    m_uas->getParamManager()->setParameter(1,"SR0_POSITION",3);
    m_uas->getParamManager()->setParameter(1,"SR0_RAW_CTRL",2);
    m_uas->getParamManager()->setParameter(1,"SR0_RAW_SENS",2);
    m_uas->getParamManager()->setParameter(1,"SR0_RC_CHAN",2);
28

29 30 31 32 33 34 35 36
    m_uas->getParamManager()->setParameter(1,"SR3_EXT_STAT",2);
    m_uas->getParamManager()->setParameter(1,"SR3_EXTRA1",10);
    m_uas->getParamManager()->setParameter(1,"SR3_EXTRA2",10);
    m_uas->getParamManager()->setParameter(1,"SR3_EXTRA3",2);
    m_uas->getParamManager()->setParameter(1,"SR3_POSITION",3);
    m_uas->getParamManager()->setParameter(1,"SR3_RAW_CTRL",2);
    m_uas->getParamManager()->setParameter(1,"SR3_RAW_SENS",2);
    m_uas->getParamManager()->setParameter(1,"SR3_RC_CHAN",2);
37
}