Commit 1e079309 authored by Gus Grubba's avatar Gus Grubba

Fix pedantic compiler errors and warnings.

parent 6e7c9f32
......@@ -526,6 +526,7 @@ int CalWorkerThread::sphere_fit_least_squares(const float x[], const float y[],
//Iterate N times, ignore stop condition.
unsigned int n = 0;
#undef FLT_EPSILON
#define FLT_EPSILON 1.1920929e-07F /* 1E-5 */
while (n < max_iterations) {
......
......@@ -2017,7 +2017,7 @@ void MissionController::_updateTimeout()
case MAV_CMD_NAV_WAYPOINT:
case MAV_CMD_NAV_LAND:
if(pSimpleItem->coordinate().isValid()) {
if(pSimpleItem->command() == MAV_CMD_NAV_TAKEOFF) {
if((MAV_CMD)pSimpleItem->command() == MAV_CMD_NAV_TAKEOFF) {
takeoffCoordinate = pSimpleItem->coordinate();
} else if(!firstCoordinate.isValid()) {
firstCoordinate = pSimpleItem->coordinate();
......@@ -2025,10 +2025,10 @@ void MissionController::_updateTimeout()
double lat = pSimpleItem->coordinate().latitude() + 90.0;
double lon = pSimpleItem->coordinate().longitude() + 180.0;
double alt = pSimpleItem->coordinate().altitude();
north = fmax(north, lat);
south = fmin(south, lat);
east = fmax(east, lon);
west = fmin(west, lon);
north = fmax(north, lat);
south = fmin(south, lat);
east = fmax(east, lon);
west = fmin(west, lon);
minAlt = fmin(minAlt, alt);
maxAlt = fmax(maxAlt, alt);
}
......
......@@ -418,7 +418,7 @@ void MissionItem::setCoordinate(const QGeoCoordinate& coordinate)
QGeoCoordinate MissionItem::coordinate(void) const
{
if(!isfinite(param5()) || !isfinite(param6())) {
if(!std::isfinite(param5()) || !std::isfinite(param6())) {
//-- If either of these are NAN, return an invalid (QGeoCoordinate::isValid() == false) coordinate
return QGeoCoordinate();
}
......
......@@ -19,6 +19,7 @@ class QGCGeoBoundingCube : public QObject {
Q_OBJECT
public:
QGCGeoBoundingCube(const QGCGeoBoundingCube& other)
: QObject()
{
pointNW = other.pointNW;
pointSE = other.pointSE;
......
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