Browse Source

Fixed windows build errors.

QGC4.4
Lorenz Meier 12 years ago
parent
commit
9a9ca548cd
  1. 6
      src/uas/ArduPilotMegaMAV.cc
  2. 10
      src/ui/PrimaryFlightDisplay.cpp

6
src/uas/ArduPilotMegaMAV.cc

@ -28,12 +28,12 @@ This file is part of the QGROUNDCONTROL project @@ -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) :

10
src/ui/PrimaryFlightDisplay.cpp

@ -112,7 +112,7 @@ @@ -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 @@ -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));

Loading…
Cancel
Save