Browse Source

QGroundControl now compiles under Visual Studio 9 / 2008. Google Earth support for Windows close to work.

QGC4.4
pixhawk 14 years ago
parent
commit
c69c7b35e0
  1. 2
      src/comm/MAVLinkSimulationLink.cc
  2. 14
      src/comm/SerialLink.cc
  3. 2
      src/uas/UAS.cc
  4. 2
      src/ui/SlugsPIDControl.h
  5. 18
      src/ui/map3D/QGCGoogleEarthView.cc
  6. 28
      src/ui/map3D/QGCGoogleEarthView.h
  7. 40
      src/ui/map3D/QGCGoogleEarthViewWin.ui

2
src/comm/MAVLinkSimulationLink.cc

@ -837,7 +837,7 @@ void MAVLinkSimulationLink::writeBytes(const char* data, qint64 size) @@ -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");

14
src/comm/SerialLink.cc

@ -184,18 +184,18 @@ void SerialLink::writeBytes(const char* data, qint64 size) @@ -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);
// }
}
}

2
src/uas/UAS.cc

@ -797,7 +797,7 @@ quint64 UAS::getUnixTime(quint64 time) @@ -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
src/ui/SlugsPIDControl.h

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
#define SLUGSPIDCONTROL_H
#include <QWidget>
#include<QGroupBox>
#include <QGroupBox>
#include "UASInterface.h"
#include "QGCMAVLink.h"
#include "SlugsMAV.h"

18
src/ui/map3D/QGCGoogleEarthView.cc

@ -6,9 +6,8 @@ @@ -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) : @@ -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) : @@ -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() @@ -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;
}

28
src/ui/map3D/QGCGoogleEarthView.h

@ -9,16 +9,15 @@ @@ -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: @@ -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: @@ -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
#endif // QGCGOOGLEEARTHVIEW_H

40
src/ui/map3D/QGCGoogleEarthViewWin.ui

@ -1,21 +1,19 @@ @@ -1,21 +1,19 @@
<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>

Loading…
Cancel
Save