From 3efea325076ed4918d09d82babbc30e434a8817f Mon Sep 17 00:00:00 2001 From: Philippe Renon Date: Tue, 19 Nov 2013 23:30:56 +0100 Subject: [PATCH] OP-1122 OP-1120 fixed regressions introduced by previous refactoring of waypoint to board transmission - re-introduced calls to updated() which are needed for some reason I don't yet understand - without the updated() call the waypoint are not sent to the board (or at least they get overwritten by the board waypoint) - with the updated() call i see lots of "!!!!!! Making request for an object: Waypoint" for which a request is already in progress!!!!!! messages. --- ground/openpilotgcs/src/plugins/opmap/modeluavoproxy.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ground/openpilotgcs/src/plugins/opmap/modeluavoproxy.cpp b/ground/openpilotgcs/src/plugins/opmap/modeluavoproxy.cpp index 5f1b1d82c..cab71749e 100644 --- a/ground/openpilotgcs/src/plugins/opmap/modeluavoproxy.cpp +++ b/ground/openpilotgcs/src/plugins/opmap/modeluavoproxy.cpp @@ -82,6 +82,7 @@ void ModelUavoProxy::modelToObjects() // send action update to UAV action->setData(actionData); + action->updated(); qDebug() << "ModelUAVProxy::modelToObjects - sent action instance :" << action->getInstID(); } else { @@ -105,6 +106,7 @@ void ModelUavoProxy::modelToObjects() // send waypoint update to UAV waypoint->setData(waypointData); + waypoint->updated(); qDebug() << "ModelUAVProxy::modelToObjects - sent waypoint instance :" << waypoint->getInstID(); } } @@ -136,7 +138,7 @@ Waypoint *ModelUavoProxy::createWaypoint(int index, Waypoint *newWaypoint) { PathAction *ModelUavoProxy::createPathAction(int index, PathAction *newAction) { PathAction *action = NULL; - int count = objManager->getNumInstances(waypointObj->getObjID()); + int count = objManager->getNumInstances(actionObj->getObjID()); if (index < count) { // reuse object qDebug() << "ModelUAVProxy::createPathAction - reused action instance :" << index << "/" << count;