Commit 8e305c77 authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #207 from Susurrus/master

URGENT: Fix broken Windows compilation
parents 50518c19 975f6fb5
...@@ -285,6 +285,9 @@ win32-msvc2008|win32-msvc2010 { ...@@ -285,6 +285,9 @@ win32-msvc2008|win32-msvc2010 {
# QWebkit is not needed on MS-Windows compilation environment # QWebkit is not needed on MS-Windows compilation environment
CONFIG -= webkit CONFIG -= webkit
# Specify the inclusion of (U)INT*_(MAX/MIN) macros within Visual Studio
DEFINES += __STDC_LIMIT_MACROS
# For release builds remove support for various Qt debugging macros. # For release builds remove support for various Qt debugging macros.
CONFIG(release, debug|release) { CONFIG(release, debug|release) {
......
// On Windows (for VS2010) stdint.h contains the limits normally contained in limits.h
// It also needs the __STDC_LIMIT_MACROS macro defined in order to include them (done
// in qgroundcontrol.pri).
#ifdef WIN32
#include <stdint.h>
#else
#include <limits.h> #include <limits.h>
#endif
#include <QTimer> #include <QTimer>
...@@ -228,8 +235,8 @@ void QGCVehicleConfig::resetCalibrationRC() ...@@ -228,8 +235,8 @@ void QGCVehicleConfig::resetCalibrationRC()
{ {
for (unsigned int i = 0; i < chanMax; ++i) for (unsigned int i = 0; i < chanMax; ++i)
{ {
rcMin[i] = INT_MAX; rcMin[i] = (float)INT_MAX;
rcMax[i] = INT_MIN; rcMax[i] = (float)INT_MIN;
} }
} }
...@@ -318,7 +325,7 @@ void QGCVehicleConfig::remoteControlChannelRawChanged(int chan, float val) ...@@ -318,7 +325,7 @@ void QGCVehicleConfig::remoteControlChannelRawChanged(int chan, float val)
if (chan < 0 || static_cast<unsigned int>(chan) >= chanMax || val < 500 || val > 2500) if (chan < 0 || static_cast<unsigned int>(chan) >= chanMax || val < 500 || val > 2500)
return; return;
if (chan + 1 > chanCount) { if (chan + 1 > (int)chanCount) {
chanCount = chan+1; chanCount = chan+1;
} }
......
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