Commit 4decb8d6 authored by Michael Carpenter's avatar Michael Carpenter

Implementation of OSD Configuration

parent d440a4d6
......@@ -114,6 +114,7 @@
<file>files/images/devices/AC-0004-11-2.jpg</file>
<file>files/images/devices/BR-0004-03-2.jpg</file>
<file>files/images/devices/BR-0016-01-3T.jpg</file>
<file>files/images/devices/MinimOSD.jpg</file>
</qresource>
<qresource prefix="/general">
<file alias="vera.ttf">files/styles/Vera.ttf</file>
......
#include "OsdConfig.h"
#include <QMessageBox>
OsdConfig::OsdConfig(QWidget *parent) : QWidget(parent)
OsdConfig::OsdConfig(QWidget *parent) : AP2ConfigWidget(parent)
{
ui.setupUi(this);
connect(ui.enablePushButton,SIGNAL(clicked()),this,SLOT(enableButtonClicked()));
}
OsdConfig::~OsdConfig()
{
}
void OsdConfig::enableButtonClicked()
{
if (!m_uas)
{
QMessageBox::information(0,tr("Error"),tr("Please connect to a MAV before attempting to set configuration"));
return;
}
m_uas->setParameter(0,"SR0_EXT_STAT",2);
m_uas->setParameter(0,"SR0_EXTRA1",10);
m_uas->setParameter(0,"SR0_EXTRA2",10);
m_uas->setParameter(0,"SR0_EXTRA3",2);
m_uas->setParameter(0,"SR0_POSITION",3);
m_uas->setParameter(0,"SR0_RAW_CTRL",2);
m_uas->setParameter(0,"SR0_RAW_SENS",2);
m_uas->setParameter(0,"SR0_RC_CHAN",2);
m_uas->setParameter(0,"SR3_EXT_STAT",2);
m_uas->setParameter(0,"SR3_EXTRA1",10);
m_uas->setParameter(0,"SR3_EXTRA2",10);
m_uas->setParameter(0,"SR3_EXTRA3",2);
m_uas->setParameter(0,"SR3_POSITION",3);
m_uas->setParameter(0,"SR3_RAW_CTRL",2);
m_uas->setParameter(0,"SR3_RAW_SENS",2);
m_uas->setParameter(0,"SR3_RC_CHAN",2);
}
......@@ -2,16 +2,18 @@
#define OSDCONFIG_H
#include <QWidget>
#include "AP2ConfigWidget.h"
#include "ui_OsdConfig.h"
class OsdConfig : public QWidget
class OsdConfig : public AP2ConfigWidget
{
Q_OBJECT
public:
explicit OsdConfig(QWidget *parent = 0);
~OsdConfig();
private slots:
void enableButtonClicked();
private:
Ui::OsdConfig ui;
};
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
<width>499</width>
<height>243</height>
</rect>
</property>
<property name="windowTitle">
......@@ -29,7 +29,57 @@
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>101</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../../qgroundcontrol.qrc">:/files/images/devices/MinimOSD.jpg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>230</x>
<y>60</y>
<width>191</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>You only need to use this if you are
having issue with your OSD not
updating</string>
</property>
</widget>
<widget class="QPushButton" name="enablePushButton">
<property name="geometry">
<rect>
<x>120</x>
<y>60</y>
<width>91</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>Enable
Telemetry</string>
</property>
</widget>
</widget>
<resources/>
<resources>
<include location="../../../qgroundcontrol.qrc"/>
</resources>
<connections/>
</ui>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment