Commit 125ece43 authored by Gus Grubba's avatar Gus Grubba

Linux build fixes.

parent 463b4852
......@@ -35,6 +35,7 @@ This file is part of the QGROUNDCONTROL project
#include "Waypoint.h"
Waypoint::Waypoint(
QObject *parent,
quint16 id,
double x,
double y,
......@@ -49,7 +50,8 @@ Waypoint::Waypoint(
int action,
const QString& description
)
: _id(id)
: QObject(parent)
, _id(id)
, _x(x)
, _y(y)
, _z(z)
......@@ -69,6 +71,7 @@ Waypoint::Waypoint(
}
Waypoint::Waypoint(const Waypoint& other)
: QObject(NULL)
{
*this = other;
}
......
......@@ -45,6 +45,7 @@ class Waypoint : public QObject
Q_OBJECT
public:
Waypoint(
QObject *parent = 0,
quint16 id = 0,
double x = 0.0,
double y = 0.0,
......
......@@ -179,12 +179,37 @@ void UASWaypointManager::handleWaypoint(quint8 systemId, quint8 compId, mavlink_
if(wp->seq == current_wp_id) {
Waypoint *lwp_vo = new Waypoint(wp->seq, wp->x, wp->y, wp->z, wp->param1, wp->param2, wp->param3, wp->param4, wp->autocontinue, wp->current, (MAV_FRAME) wp->frame, (MAV_CMD) wp->command);
addWaypointViewOnly(lwp_vo);
Waypoint *lwp_vo = new Waypoint(
NULL,
wp->seq, wp->x,
wp->y,
wp->z,
wp->param1,
wp->param2,
wp->param3,
wp->param4,
wp->autocontinue,
wp->current,
(MAV_FRAME) wp->frame,
(MAV_CMD) wp->command);
addWaypointViewOnly(lwp_vo);
if (read_to_edit == true) {
Waypoint *lwp_ed = new Waypoint(wp->seq, wp->x, wp->y, wp->z, wp->param1, wp->param2, wp->param3, wp->param4, wp->autocontinue, wp->current, (MAV_FRAME) wp->frame, (MAV_CMD) wp->command);
Waypoint *lwp_ed = new Waypoint(
NULL,
wp->seq,
wp->x,
wp->y,
wp->z,
wp->param1,
wp->param2,
wp->param3,
wp->param4,
wp->autocontinue,
wp->current,
(MAV_FRAME) wp->frame,
(MAV_CMD) wp->command);
addWaypointEditable(lwp_ed, false);
if (wp->current == 1) currentWaypointEditable = lwp_ed;
}
......@@ -216,7 +241,20 @@ void UASWaypointManager::handleWaypoint(quint8 systemId, quint8 compId, mavlink_
&& wp->seq < waypointsViewOnly.size() && waypointsViewOnly[wp->seq]->getAction()) {
// accept single sent waypoints because they can contain updates about remaining DO_JUMP repetitions
// but only update view only side
Waypoint *lwp_vo = new Waypoint(wp->seq, wp->x, wp->y, wp->z, wp->param1, wp->param2, wp->param3, wp->param4, wp->autocontinue, wp->current, (MAV_FRAME) wp->frame, (MAV_CMD) wp->command);
Waypoint *lwp_vo = new Waypoint(
NULL,
wp->seq,
wp->x,
wp->y,
wp->z,
wp->param1,
wp->param2,
wp->param3,
wp->param4,
wp->autocontinue,
wp->current,
(MAV_FRAME) wp->frame,
(MAV_CMD) wp->command);
waypointsViewOnly.replace(wp->seq, lwp_vo);
emit waypointViewOnlyListChanged();
......
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