Commit 1827000b authored by LM's avatar LM

Deactivated libxbee

parent 5353d44f
......@@ -509,19 +509,19 @@ win32:exists(src/lib/opalrt/OpalApi.h):exists(C:/OPAL-RT/RT-LAB7.2.4/Common/bin)
TRANSLATIONS += es-MX.ts \
en-US.ts
# xbee support
# libxbee only supported by linux and windows systems
win32-msvc2008|win32-msvc2010|linux{
HEADERS += src/comm/XbeeLinkInterface.h \
src/comm/XbeeLink.h \
src/ui/XbeeConfigurationWindow.h \
src/comm/CallConv.h
SOURCES += src/comm/XbeeLink.cpp \
src/ui/XbeeConfigurationWindow.cpp
DEFINES += XBEELINK
INCLUDEPATH += thirdParty/libxbee
# TO DO: build library when it does not exists already
LIBS += -LthirdParty/libxbee/lib \
-llibxbee
}
## xbee support
## libxbee only supported by linux and windows systems
##win32-msvc2008|win32-msvc2010|linux{
# HEADERS += src/comm/XbeeLinkInterface.h \
# src/comm/XbeeLink.h \
# src/ui/XbeeConfigurationWindow.h \
# src/comm/CallConv.h
# SOURCES += src/comm/XbeeLink.cpp \
# src/ui/XbeeConfigurationWindow.cpp
# DEFINES += XBEELINK
# INCLUDEPATH += thirdParty/libxbee
## TO DO: build library when it does not exists already
# LIBS += -LthirdParty/libxbee/lib \
# -llibxbee
#
#}
......@@ -33,6 +33,7 @@ This file is part of the QGROUNDCONTROL project
#include <QObject>
#include <QDomDocument>
#include <QString>
#include <inttypes.h>
/**
* @brief MAVLink micro air vehicle protocol generator
......
......@@ -29,7 +29,6 @@ FORMS += ui/XMLCommProtocolWidget.ui
HEADERS += \
ui/XMLCommProtocolWidget.h \
generator/MAVLinkXMLParser.h \
generator/MAVLinkXMLParserV10.h \
ui/DomItem.h \
ui/DomModel.h \
ui/QGCMAVLinkTextEdit.h
......@@ -38,7 +37,6 @@ SOURCES += \
ui/DomItem.cc \
ui/DomModel.cc \
generator/MAVLinkXMLParser.cc \
generator/MAVLinkXMLParserV10.cc \
ui/QGCMAVLinkTextEdit.cc
RESOURCES += mavlinkgen.qrc
......@@ -6,7 +6,6 @@
#include "XMLCommProtocolWidget.h"
#include "ui_XMLCommProtocolWidget.h"
#include "MAVLinkXMLParser.h"
#include "MAVLinkXMLParserV10.h"
#include <QDebug>
#include <iostream>
......@@ -132,37 +131,18 @@ void XMLCommProtocolWidget::generate()
// Syntax check already gives output
return;
}
MAVLinkXMLParser* parser = NULL;
MAVLinkXMLParserV10* parserV10 = NULL;
bool result = false;
if (m_ui->versionComboBox->currentIndex() == 0)
{
MAVLinkXMLParser* parser = new MAVLinkXMLParser(m_ui->fileNameLabel->text().trimmed(), m_ui->outputDirNameLabel->text().trimmed());
connect(parser, SIGNAL(parseState(QString)), m_ui->compileLog, SLOT(appendHtml(QString)));
result = parser->generate();
}
else if (m_ui->versionComboBox->currentIndex() == 1)
{
MAVLinkXMLParserV10* parserV10 = new MAVLinkXMLParserV10(m_ui->fileNameLabel->text().trimmed(), m_ui->outputDirNameLabel->text().trimmed());
connect(parserV10, SIGNAL(parseState(QString)), m_ui->compileLog, SLOT(appendHtml(QString)));
result = parserV10->generate();
}
if (result)
{
MAVLinkXMLParser* parser = new MAVLinkXMLParser(m_ui->fileNameLabel->text().trimmed(), m_ui->outputDirNameLabel->text().trimmed());
connect(parser, SIGNAL(parseState(QString)), m_ui->compileLog, SLOT(appendHtml(QString)));
bool result = parser->generate();
if (result) {
QMessageBox msgBox;
msgBox.setText(QString("The C code / headers have been generated in folder\n%1").arg(m_ui->outputDirNameLabel->text().trimmed()));
msgBox.exec();
}
else
{
} else {
QMessageBox::critical(this, tr("C code generation failed, please see the compile log for further information"), QString("The C code / headers could not be written to folder\n%1").arg(m_ui->outputDirNameLabel->text().trimmed()), QMessageBox::Ok);
}
if (parser) delete parser;
if (parserV10) delete parserV10;
delete parser;
}
void XMLCommProtocolWidget::save()
......
......@@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QGridLayout" name="gridLayout" rowstretch="1,1,100,1,1,1,0" columnstretch="1,1,1,100">
<layout class="QGridLayout" name="gridLayout" rowstretch="1,1,100,1,1,1" columnstretch="1,1,1,100">
<property name="topMargin">
<number>6</number>
</property>
......@@ -51,12 +51,12 @@
<string>Select input file</string>
</property>
<property name="icon">
<iconset resource="../../../../qgroundcontrol.qrc">
<iconset resource="../mavlinkgen.qrc">
<normaloff>:/images/status/folder-open.svg</normaloff>:/images/status/folder-open.svg</iconset>
</property>
</widget>
</item>
<item row="0" column="3" rowspan="7">
<item row="0" column="3" rowspan="6">
<widget class="QGCMAVLinkTextEdit" name="xmlTextView">
<property name="minimumSize">
<size>
......@@ -97,70 +97,49 @@
<string>Select directory</string>
</property>
<property name="icon">
<iconset resource="../../../../qgroundcontrol.qrc">
<iconset resource="../mavlinkgen.qrc">
<normaloff>:/images/status/folder-open.svg</normaloff>:/images/status/folder-open.svg</iconset>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<item row="2" column="0" colspan="3">
<widget class="QTreeView" name="xmlTreeView"/>
</item>
<item row="4" column="0" colspan="2">
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>Compile Output</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="3">
<item row="4" column="0" colspan="3">
<widget class="QPlainTextEdit" name="compileLog"/>
</item>
<item row="6" column="0">
<item row="5" column="0">
<widget class="QLabel" name="validXMLLabel">
<property name="text">
<string>No file loaded</string>
</property>
</widget>
</item>
<item row="6" column="1">
<item row="5" column="1">
<widget class="QPushButton" name="saveButton">
<property name="text">
<string>Save file</string>
</property>
</widget>
</item>
<item row="6" column="2">
<item row="5" column="2">
<widget class="QPushButton" name="generateButton">
<property name="text">
<string>Save and generate</string>
</property>
<property name="icon">
<iconset resource="../../../../qgroundcontrol.qrc">
<iconset resource="../mavlinkgen.qrc">
<normaloff>:/images/categories/applications-system.svg</normaloff>:/images/categories/applications-system.svg</iconset>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Select MAVLink Version</string>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QComboBox" name="versionComboBox">
<item>
<property name="text">
<string>MAVLink v0.9 (-Aug'10)</string>
</property>
</item>
<item>
<property name="text">
<string>MAVLink v1.0 (Sept'10+)</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<customwidgets>
......@@ -171,7 +150,7 @@
</customwidget>
</customwidgets>
<resources>
<include location="../../../../qgroundcontrol.qrc"/>
<include location="../mavlinkgen.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