Commit c69c7b35 authored by pixhawk's avatar pixhawk

QGroundControl now compiles under Visual Studio 9 / 2008. Google Earth support...

QGroundControl now compiles under Visual Studio 9 / 2008. Google Earth support for Windows close to work.
parent 8d1552b9
......@@ -837,7 +837,7 @@ void MAVLinkSimulationLink::writeBytes(const char* data, qint64 size)
}
unsigned char v=data[i];
//unsigned char v=data[i];
//fprintf(stderr,"%02x ", v);
}
//fprintf(stderr,"\n");
......
......@@ -184,18 +184,18 @@ void SerialLink::writeBytes(const char* data, qint64 size)
if(port->isOpen())
{
int b = port->write(data, size);
qDebug() << "Transmitted " << b << "bytes:";
qDebug() << "Serial link " << this->getName() << "transmitted" << b << "bytes:";
// Increase write counter
bitsSentTotal += size * 8;
int i;
for (i=0; i<size; i++)
{
unsigned char v=data[i];
// int i;
// for (i=0; i<size; i++)
// {
// unsigned char v=data[i];
//fprintf(stderr,"%02x ", v);
}
// //fprintf(stderr,"%02x ", v);
// }
}
}
......
......@@ -797,7 +797,7 @@ quint64 UAS::getUnixTime(quint64 time)
// 60 seconds
// 1000 milliseconds
// 1000 microseconds
#ifndef _MSVC_VER
#ifndef _MSC_VER
else if (time < 1261440000000000LLU)
#else
else if (time < 1261440000000000)
......
......@@ -2,7 +2,7 @@
#define SLUGSPIDCONTROL_H
#include <QWidget>
#include<QGroupBox>
#include <QGroupBox>
#include "UASInterface.h"
#include "QGCMAVLink.h"
#include "SlugsMAV.h"
......
......@@ -6,9 +6,8 @@
#include "QGCGoogleEarthView.h"
#include "QGCWebPage.h"
#include "UASManager.h"
#include "ui_QGCGoogleEarthControls.h"
#if (defined Q_OS_WIN) && !(defined __MINGW32__)
#include "ui_QGCGoogleEarthViewWin.h"
#ifdef _MSC_VER
#include "ui_QGCGoogleEarthView.h"
#else
#include "ui_QGCGoogleEarthView.h"
#endif
......@@ -24,13 +23,16 @@ QGCGoogleEarthView::QGCGoogleEarthView(QWidget *parent) :
#if (defined Q_OS_MAC)
webViewMac(new QWebView(this)),
#endif
#if (defined Q_OS_WIN) & !(defined __MINGW32__)
#ifdef _MSC_VER
webViewWin(new QGCWebAxWidget(this)),
#endif
#if (defined _MSC_VER)
ui(new Ui::QGCGoogleEarthView)
#else
ui(new Ui::QGCGoogleEarthView)
#endif
{
#if (defined Q_OS_WIN) & !(defined __MINGW32__)
#ifdef _MSC_VER
// Create layout and attach webViewWin
#else
#endif
......@@ -40,7 +42,7 @@ QGCGoogleEarthView::QGCGoogleEarthView(QWidget *parent) :
ui->webViewLayout->addWidget(webViewMac);
#endif
#if ((defined Q_OS_MAC) | ((defined Q_OS_WIN) & !(defined __MINGW32__)))
#if ((defined Q_OS_MAC) | (defined _MSC_VER))
connect(UASManager::instance(), SIGNAL(activeUASSet(UASInterface*)), this, SLOT(setActiveUAS(UASInterface*)));
connect(updateTimer, SIGNAL(timeout()), this, SLOT(updateState()));
updateTimer->start(refreshRateMs);
......@@ -104,8 +106,8 @@ void QGCGoogleEarthView::show()
webViewMac->load(QUrl("earth.html"));
#endif
#if (defined Q_OS_WIN) & !(defined __MINGW32__)
webViewWin->load(QUrl("earth.html"));
#ifdef _MSC_VER
//webViewWin->load(QUrl("earth.html"));
#endif
webViewInitialized = true;
}
......
......@@ -9,16 +9,15 @@
#include <QWebView>
#endif
#if (defined Q_OS_WIN) & (defined _MSVC_VER)
QGCWebAxWidget* webViewWin;
#ifdef _MSC_VER
#include <ActiveQt/QAxWidget>
#include "windows.h"
class WebAxWidget : public QAxWidget
class QGCWebAxWidget : public QAxWidget
{
public:
WebAxWidget(QWidget* parent = 0, Qt::WindowFlags f = 0)
QGCWebAxWidget(QWidget* parent = 0, Qt::WindowFlags f = 0)
: QAxWidget(parent, f)
{
}
......@@ -32,16 +31,15 @@ protected:
}
};
#else
#endif
namespace Ui {
class QGCGoogleEarthControls;
#if (defined Q_OS_WIN) & (defined _MSVC_VER)
class QGCGoogleEarthViewWin;
#ifdef _MSC_VER
class QGCGoogleEarthView;
#else
class QGCGoogleEarthView;
#endif
}
#endif
class QGCGoogleEarthView : public QWidget
{
......@@ -75,21 +73,19 @@ protected:
bool followCamera;
bool trailEnabled;
bool webViewInitialized;
#if (defined Q_OS_WIN) & (defined _MSVC_VER)
#if (defined Q_OS_WIN) && !(defined __MINGW32__)
WebAxWidget* webViewWin;
#ifdef _MSC_VER
QGCWebAxWidget* webViewWin;
#endif
#if (defined Q_OS_MAC)
QWebView* webViewMac;
#endif
private:
Ui::QGCGoogleEarthControls* controls;
#if (defined Q_OS_WIN) && !(defined __MINGW32__)
Ui::QGCGoogleEarthViewWin* ui;
#ifdef _MSC_VER
Ui::QGCGoogleEarthView* ui;
#else
Ui::QGCGoogleEarthView* ui;
#endif
};
#endif // QGCGOOGLEEARTHVIEW_H
\ No newline at end of file
#endif // QGCGOOGLEEARTHVIEW_H
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>Form</class>
<widget class="QWidget" name="Form" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle" >
<string>Form</string>
</property>
</widget>
<pixmapfunction></pixmapfunction>
<connections/>
</ui>
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>QGCGoogleEarthViewWin</class>
<widget class="QWidget" name="QGCGoogleEarthViewWin">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>300</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
</widget>
<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