diff --git a/src/GAudioOutput.cc b/src/GAudioOutput.cc index 6d35f6215871ce4fed3a47faa7c7bdea303f36bd..e10d7fa4dd53e71aefc5a7cf4e13aa0341b22685 100644 --- a/src/GAudioOutput.cc +++ b/src/GAudioOutput.cc @@ -41,7 +41,8 @@ This file is part of the QGROUNDCONTROL project #endif // Speech synthesis is only supported with MSVC compiler -#if _MSC_VER +#if _MSC_VER2 +// Documentation: http://msdn.microsoft.com/en-us/library/ee125082%28v=VS.85%29.aspx #include using System; using System.Speech.Synthesis; @@ -111,7 +112,7 @@ bool GAudioOutput::say(QString text, int severity) { // Speech synthesis is only supported with MSVC compiler -#ifdef _MSC_VER +#ifdef _MSC_VER2 SpeechSynthesizer synth = new SpeechSynthesizer(); synth.SelectVoice("Microsoft Anna"); synth.SpeakText(text.toStdString().c_str()); diff --git a/src/MG.h b/src/MG.h index bde9c3d37f1867fbbb5452ae51b486d241962ecc..2e82de2c0c956e42274002b2ca98c08328fc0a0d 100644 --- a/src/MG.h +++ b/src/MG.h @@ -264,7 +264,7 @@ namespace MG * @param screenDiameter The screen diameter in mm, e.g. 13.3" = 338 mm. */ static void setPixelSize(int horizontalResolution, int verticalResolution, double screenDiameter) { - pixelSize = screenDiameter / sqrt((horizontalResolution^(2)) + (verticalResolution^(2))); + pixelSize = screenDiameter / sqrt(static_cast(horizontalResolution*horizontalResolution + verticalResolution*verticalResolution)); } private: diff --git a/src/comm/MAVLinkSimulationLink.cc b/src/comm/MAVLinkSimulationLink.cc index d63474ad6e5d4df04e490b90ed05f37c64d1e509..56337c48a7f64a48a16750e311597d68ad23ea8f 100644 --- a/src/comm/MAVLinkSimulationLink.cc +++ b/src/comm/MAVLinkSimulationLink.cc @@ -380,9 +380,9 @@ void MAVLinkSimulationLink::mainloop() // Move X Position - x = x*0.93f + 0.07f*(x+sin(QGC::groundTimeUsecs()) * 0.08f); - y = y*0.93f + 0.07f*(y+sin(QGC::groundTimeUsecs()) * 0.5f); - z = z*0.93f + 0.07f*(z+sin(QGC::groundTimeUsecs()*100000) * 0.1f); + x = x*0.93f + 0.07f*(x+sin(static_cast(QGC::groundTimeUsecs()) * 0.08f)); + y = y*0.93f + 0.07f*(y+sin(static_cast(QGC::groundTimeUsecs()) * 0.5f)); + z = z*0.93f + 0.07f*(z+sin(static_cast(QGC::groundTimeUsecs()*0.001f)) * 0.1f); x = 5247273.0f; y = 465955.0f; // x = (x > 5.0f) ? 5.0f : x; diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 3b4f136189ef183b5cbed875b720ab93af2a6831..b895e5ad9f88d3d87f304e8f708484e2464a274e 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -729,7 +729,7 @@ quint64 UAS::getUnixTime(quint64 time) // 60 seconds // 1000 milliseconds // 1000 microseconds - else if (time < 1261440000000000LLU) + else if (time < 1261440000000000) { if (onboardTimeOffset == 0) { diff --git a/src/ui/HDDisplay.cc b/src/ui/HDDisplay.cc index 5d9a449154c8af3e6406eae0773b0fc52373c629..1f8f11208dc81f470b2dd070a03e365e6f162be4 100644 --- a/src/ui/HDDisplay.cc +++ b/src/ui/HDDisplay.cc @@ -38,7 +38,9 @@ This file is part of the PIXHAWK project #include "HDDisplay.h" #include "ui_HDDisplay.h" #include "MG.h" - +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif #include HDDisplay::HDDisplay(QStringList* plotList, QWidget *parent) : diff --git a/src/ui/HSIDisplay.cc b/src/ui/HSIDisplay.cc index e7b0944dfd1277845699e7335a9c85490111b1b6..a9a993a02dc1a2a65fbc84cddf1f1594a97df0bb 100644 --- a/src/ui/HSIDisplay.cc +++ b/src/ui/HSIDisplay.cc @@ -478,7 +478,7 @@ void HSIDisplay::updateSpeed(UASInterface* uas, double vx, double vy, double vz, this->vx = vx; this->vy = vy; this->vz = vz; - this->speed = sqrt(pow(vx, 2.0f) + pow(vy, 2.0f) + pow(vz, 2.0f)); + this->speed = sqrt(pow(vx, 2.0) + pow(vy, 2.0) + pow(vz, 2.0)); } void HSIDisplay::setBodySetpointCoordinateXY(double x, double y) diff --git a/src/ui/HUD.cc b/src/ui/HUD.cc index 2267a3f5148fcf015c2f0f494208efa62277c6a7..872f2b9659566cffd36883cd97fe28a144768bda 100644 --- a/src/ui/HUD.cc +++ b/src/ui/HUD.cc @@ -31,6 +31,9 @@ This file is part of the QGROUNDCONTROL project #include #include +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif #include #include "UASManager.h" diff --git a/src/ui/WaypointView.cc b/src/ui/WaypointView.cc index 7e5244a8b2f08c016da2f74069b586aff24f58b1..6732b0b79e175b5dfd1c3cdbbd73587b8b66ca8c 100644 --- a/src/ui/WaypointView.cc +++ b/src/ui/WaypointView.cc @@ -35,6 +35,9 @@ This file is part of the PIXHAWK project #include #include //M_PI +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif #include "WaypointView.h" #include "ui_WaypointView.h"