Commit d0a07f19 authored by lm's avatar lm

Stability changes

parent 3079a42d
...@@ -83,7 +83,7 @@ voice(NULL), ...@@ -83,7 +83,7 @@ voice(NULL),
voiceIndex(0), voiceIndex(0),
emergency(false) emergency(false)
{ {
#if Q_OS_LINUX #ifdef Q_OS_LINUX
flite_init(); flite_init();
#endif #endif
m_media = new Phonon::MediaObject(this); m_media = new Phonon::MediaObject(this);
......
...@@ -180,9 +180,10 @@ bool MAVLinkXMLParser::generate() ...@@ -180,9 +180,10 @@ bool MAVLinkXMLParser::generate()
QDateTime now = QDateTime::currentDateTime().toUTC(); QDateTime now = QDateTime::currentDateTime().toUTC();
QString dateFormat = "dddd, MMMM d yyyy, hh:mm UTC"; QString dateFormat = "dddd, MMMM d yyyy, hh:mm UTC";
QString date = now.toString(dateFormat); QString date = now.toString(dateFormat);
QString mainHeader = QString("/** @file\n *\t@brief MAVLink comm protocol.\n *\t@see http://pixhawk.ethz.ch/software/mavlink\n *\t Generated on %1\n */\n#ifndef MAVLINK_H\n#define MAVLINK_H\n\n#include \"protocol.h\"\n\n\n").arg(date); // The main header includes all messages QString mainHeader = QString("/** @file\n *\t@brief MAVLink comm protocol.\n *\t@see http://pixhawk.ethz.ch/software/mavlink\n *\t Generated on %1\n */\n#ifndef MAVLINK_H\n#define MAVLINK_H\n\n").arg(date); // The main header includes all messages
// Mark all code as C code // Mark all code as C code
mainHeader += "#ifdef __cplusplus\nextern \"C\" {\n#endif\n"; mainHeader += "#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n";
mainHeader += "\n#include \"protocol.h\"\n";
QString includeLine = "#include \"%1\"\n"; QString includeLine = "#include \"%1\"\n";
QString mainHeaderName = "mavlink.h"; QString mainHeaderName = "mavlink.h";
QString messagesDirName = "generated"; QString messagesDirName = "generated";
...@@ -200,6 +201,8 @@ bool MAVLinkXMLParser::generate() ...@@ -200,6 +201,8 @@ bool MAVLinkXMLParser::generate()
mainHeader += "#ifdef __cplusplus\n}\n#endif\n"; mainHeader += "#ifdef __cplusplus\n}\n#endif\n";
mainHeader += "#endif"; mainHeader += "#endif";
// Newline to make compiler happy
mainHeader += "\n";
// Write main header // Write main header
QFile rawHeader(outputDirName + "/" + mainHeaderName); QFile rawHeader(outputDirName + "/" + mainHeaderName);
......
...@@ -172,7 +172,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) ...@@ -172,7 +172,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent)
LinkManager::instance()->addProtocol(simulationLink, mavlink); LinkManager::instance()->addProtocol(simulationLink, mavlink);
//CommConfigurationWindow* simulationWidget = new CommConfigurationWindow(simulationLink, mavlink, this); //CommConfigurationWindow* simulationWidget = new CommConfigurationWindow(simulationLink, mavlink, this);
//ui.menuNetwork->addAction(commWidget->getAction()); //ui.menuNetwork->addAction(commWidget->getAction());
simulationLink->connect(); //simulationLink->connect();
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
......
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