Commit c62765eb authored by LM's avatar LM

Fixed compile errors and warnings for Windows.

parent ec4d2313
......@@ -320,8 +320,14 @@ win32-msvc2008 {
message(Building for Windows Visual Studio 2008 (32bit))
# QAxContainer support is needed for the Internet Control
# element showing the Google Earth window
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
CONFIG -= webkit
......
......@@ -33,9 +33,22 @@
/* Windows fixes */
#ifdef _MSC_VER
#include <math.h>
#define isnan(x) _isnan(x)
#define isinf(x) (!_finite(x))
/* Needed define for Eigen */
//#define NOMINMAX
#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
#include <cmath>
#ifndef isnan
......
......@@ -820,7 +820,7 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t*
mavlink_msg_action_decode(msg, &action);
if(action.target == systemid) {
if (verbose) qDebug("Waypoint: received message with action %d\n", action.action);
switch (action.action) {
// switch (action.action) {
// case MAV_ACTION_LAUNCH:
// if (verbose) std::cerr << "Launch received" << std::endl;
// current_active_wp_id = 0;
......@@ -847,10 +847,10 @@ void MAVLinkSimulationWaypointPlanner::mavlink_handler (const mavlink_message_t*
// default:
// if (verbose) std::cerr << "Unknown action received with id " << action.action << ", no action taken" << std::endl;
// break;
}
// }
}
break;
}
}
case MAVLINK_MSG_ID_WAYPOINT_ACK: {
mavlink_waypoint_ack_t wpa;
......
......@@ -20,7 +20,7 @@ QGCUASParamManager::QGCUASParamManager(UASInterface* uas, QWidget *parent) :
*/
void QGCUASParamManager::requestParameterListUpdate(int component)
{
Q_UNUSED(component);
}
......@@ -51,20 +51,6 @@ This file is part of the QGROUNDCONTROL project
#define GL_MULTISAMPLE 0x809D
#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
* 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