From 9a9ca548cddcb2813898d6fb23b02f4a1a9fc5e2 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 13 Jun 2013 13:31:32 +0200 Subject: [PATCH 1/2] Fixed windows build errors. --- src/uas/ArduPilotMegaMAV.cc | 6 +++--- src/ui/PrimaryFlightDisplay.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/uas/ArduPilotMegaMAV.cc b/src/uas/ArduPilotMegaMAV.cc index b1d7c84..c3c34c5 100644 --- a/src/uas/ArduPilotMegaMAV.cc +++ b/src/uas/ArduPilotMegaMAV.cc @@ -28,12 +28,12 @@ This file is part of the QGROUNDCONTROL project #include "ArduPilotMegaMAV.h" -#ifndef mavlink_mount_configure_t +#ifndef MAVLINK_MSG_ID_MOUNT_CONFIGURE #include "ardupilotmega/mavlink_msg_mount_configure.h" #endif -#ifndef mavlink_mount_control_t -#include "ardupilotmega/mavlink_msg_mount_control.h"; +#ifndef MAVLINK_MSG_ID_MOUNT_CONTROL +#include "ardupilotmega/mavlink_msg_mount_control.h" #endif ArduPilotMegaMAV::ArduPilotMegaMAV(MAVLinkProtocol* mavlink, int id) : diff --git a/src/ui/PrimaryFlightDisplay.cpp b/src/ui/PrimaryFlightDisplay.cpp index b5a732b..2c595b4 100644 --- a/src/ui/PrimaryFlightDisplay.cpp +++ b/src/ui/PrimaryFlightDisplay.cpp @@ -112,7 +112,7 @@ */ double PrimaryFlightDisplay_round(double value, int digits=0) { - return floor(value * pow(10, digits) + 0.5) / pow(10, digits); + return floor(value * pow(10.0f, digits) + 0.5f) / pow(10.0f, digits); } const int PrimaryFlightDisplay::tickValues[] = {10, 20, 30, 45, 60}; @@ -546,17 +546,17 @@ void PrimaryFlightDisplay::drawAIAirframeFixedFeatures(QPainter& painter, QRectF qreal h = area.height(); QPen pen; - pen.setWidthF(lineWidth * 1.5); + pen.setWidthF(lineWidth * 1.5f); pen.setColor(redColor); painter.setPen(pen); - float length = 0.15; - float side = 0.5; + float length = 0.15f; + float side = 0.5f; // The 2 lines at sides. painter.drawLine(QPointF(-side*w, 0), QPointF(-(side-length)*w, 0)); painter.drawLine(QPointF(side*w, 0), QPointF((side-length)*w, 0)); - float rel = length/qSqrt(2); + float rel = length/qSqrt(2.0f); // The gull painter.drawLine(QPointF(rel*w, rel*w/2), QPoint(0, 0)); painter.drawLine(QPointF(-rel*w, rel*w/2), QPoint(0, 0)); From c2d396db6d74bf2f8f9c8049864f8cec4122a0ce Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 13 Jun 2013 13:32:19 +0200 Subject: [PATCH 2/2] Potential fixes for ActiveQt --- qgroundcontrol.pri | 3 ++- qgroundcontrol.pro | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/qgroundcontrol.pri b/qgroundcontrol.pri index 30f3aa6..e3b7f8e 100644 --- a/qgroundcontrol.pri +++ b/qgroundcontrol.pri @@ -301,7 +301,8 @@ win32-msvc2008|win32-msvc2010|win32-msvc2012 { INCLUDEPATH += $$BASEDIR/libs/lib/sdl/msvc/include \ $$BASEDIR/libs/lib/opal/include \ - $$BASEDIR/libs/lib/msinttypes + $$BASEDIR/libs/lib/msinttypes \ + $$(QTDIR)/src/activeqt/shared LIBS += -L$$BASEDIR/libs/lib/sdl/msvc/lib \ -lSDLmain -lSDL \ diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index c6988f3..9990466 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -68,6 +68,7 @@ win32 { system( cd $$(QTDIR)\\src\\activeqt && $$(QTDIR)\\bin\\qmake.exe ) system( cd $$(QTDIR)\\src\\activeqt\\container && $$(QTDIR)\\bin\\qmake.exe ) system( cd $$(QTDIR)\\src\\activeqt\\control && $$(QTDIR)\\bin\\qmake.exe ) + system( cd $$(QTDIR)\\src\\activeqt && nmake ) } }