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