Commit c62765eb authored by LM's avatar LM

Fixed compile errors and warnings for Windows.

parent ec4d2313
...@@ -320,8 +320,14 @@ win32-msvc2008 { ...@@ -320,8 +320,14 @@ win32-msvc2008 {
message(Building for Windows Visual Studio 2008 (32bit)) message(Building for Windows Visual Studio 2008 (32bit))
# QAxContainer support is needed for the Internet Control
# element showing the Google Earth window
CONFIG += qaxcontainer CONFIG += qaxcontainer
# The EIGEN library needs this define
# to make the internal min/max functions work
DEFINES += NOMINMAX
# QWebkit is not needed on MS-Windows compilation environment # QWebkit is not needed on MS-Windows compilation environment
CONFIG -= webkit CONFIG -= webkit
......
...@@ -33,9 +33,22 @@ ...@@ -33,9 +33,22 @@
/* Windows fixes */ /* Windows fixes */
#ifdef _MSC_VER #ifdef _MSC_VER
#include <math.h> /* Needed define for Eigen */
#define isnan(x) _isnan(x) //#define NOMINMAX
#define isinf(x) (!_finite(x)) #include <limits>
template<typename T>
inline bool isnan(T value)
{
return value != value;
}
// requires #include <limits>
template<typename T>
inline bool isinf(T value)
{
return std::numeric_limits<T>::has_infinity && (value == std::numeric_limits<T>::infinity() || (-1*value) == std::numeric_limits<T>::infinity());
}
#else #else
#include <cmath> #include <cmath>
#ifndef isnan #ifndef isnan
......
...@@ -820,7 +820,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* ...@@ -820,7 +820,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t*
mavlink_msg_action_decode(msg, &action); mavlink_msg_action_decode(msg, &action);
if(action.target == systemid) { if(action.target == systemid) {
if (verbose) qDebug("Waypoint: received message with action %d\n", action.action); if (verbose) qDebug("Waypoint: received message with action %d\n", action.action);
switch (action.action) { // switch (action.action) {
// case MAV_ACTION_LAUNCH: // case MAV_ACTION_LAUNCH:
// if (verbose) std::cerr << "Launch received" << std::endl; // if (verbose) std::cerr << "Launch received" << std::endl;
// current_active_wp_id = 0; // current_active_wp_id = 0;
...@@ -847,10 +847,10 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t* ...@@ -847,10 +847,10 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t*
// default: // default:
// if (verbose) std::cerr << "Unknown action received with id " << action.action << ", no action taken" << std::endl; // if (verbose) std::cerr << "Unknown action received with id " << action.action << ", no action taken" << std::endl;
// break; // break;
} // }
} }
break; break;
} }
case MAVLINK_MSG_ID_WAYPOINT_ACK: { case MAVLINK_MSG_ID_WAYPOINT_ACK: {
mavlink_waypoint_ack_t wpa; mavlink_waypoint_ack_t wpa;
......
...@@ -20,7 +20,7 @@ QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) : ...@@ -20,7 +20,7 @@ QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) :
*/ */
void QGCUASParamManager::requestParameterListUpdate(int component) void QGCUASParamManager::requestParameterListUpdate(int component)
{ {
Q_UNUSED(component);
} }
...@@ -51,20 +51,6 @@ This file is part of the QGROUNDCONTROL project ...@@ -51,20 +51,6 @@ This file is part of the QGROUNDCONTROL project
#define GL_MULTISAMPLE 0x809D #define GL_MULTISAMPLE 0x809D
#endif #endif
template<typename T>
inline bool isnan(T value)
{
return value != value;
}
// requires #include <limits>
template<typename T>
inline bool isinf(T value)
{
return std::numeric_limits<T>::has_infinity && (value == std::numeric_limits<T>::infinity() || (-1*value) == std::numeric_limits<T>::infinity());
}
/** /**
* @warning The HUD widget will not start painting its content automatically * @warning The HUD widget will not start painting its content automatically
* to update the view, start the auto-update by calling HUD::start(). * to update the view, start the auto-update by calling HUD::start().
......
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