From f4c240a19cc132b3daffb966c62f1e44b7dc421f Mon Sep 17 00:00:00 2001 From: LM Date: Thu, 15 Sep 2011 11:12:16 +0200 Subject: [PATCH] Fixed earlier merge error, linechart operational again --- src/uas/PxQuadMAV.cc | 26 +++++++++++++------------- src/uas/UASWaypointManager.cc | 2 +- src/ui/MainWindow.cc | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/uas/PxQuadMAV.cc b/src/uas/PxQuadMAV.cc index b0fc16760..b3c0faf07 100644 --- a/src/uas/PxQuadMAV.cc +++ b/src/uas/PxQuadMAV.cc @@ -108,19 +108,19 @@ void PxQuadMAV::receiveMessage(LinkInterface* link, mavlink_message_t message) emit valueChanged(uasId, "vis. z", "m", pos.z, time); } break; - case MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE: { - mavlink_global_vision_position_estimate_t pos; - mavlink_msg_global_vision_position_estimate_decode(&message, &pos); - quint64 time = getUnixTime(pos.usec); - //emit valueChanged(uasId, "vis. time", pos.usec, time); - emit valueChanged(uasId, "glob. vis. roll", "rad", pos.roll, time); - emit valueChanged(uasId, "glob. vis. pitch", "rad", pos.pitch, time); - emit valueChanged(uasId, "glob. vis. yaw", "rad", pos.yaw, time); - emit valueChanged(uasId, "glob. vis. x", "m", pos.x, time); - emit valueChanged(uasId, "glob. vis. y", "m", pos.y, time); - emit valueChanged(uasId, "glob. vis. z", "m", pos.z, time); - } - break; +// case MAVLINK_MSG_ID_GLOBAL_VISION_POSITION_ESTIMATE: { +// mavlink_global_vision_position_estimate_t pos; +// mavlink_msg_global_vision_position_estimate_decode(&message, &pos); +// quint64 time = getUnixTime(pos.usec); +// //emit valueChanged(uasId, "vis. time", pos.usec, time); +// emit valueChanged(uasId, "glob. vis. roll", "rad", pos.roll, time); +// emit valueChanged(uasId, "glob. vis. pitch", "rad", pos.pitch, time); +// emit valueChanged(uasId, "glob. vis. yaw", "rad", pos.yaw, time); +// emit valueChanged(uasId, "glob. vis. x", "m", pos.x, time); +// emit valueChanged(uasId, "glob. vis. y", "m", pos.y, time); +// emit valueChanged(uasId, "glob. vis. z", "m", pos.z, time); +// } +// break; case MAVLINK_MSG_ID_VICON_POSITION_ESTIMATE: { mavlink_vicon_position_estimate_t pos; mavlink_msg_vicon_position_estimate_decode(&message, &pos); diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index 92162784e..03a3e2e5a 100644 --- a/src/uas/UASWaypointManager.cc +++ b/src/uas/UASWaypointManager.cc @@ -92,7 +92,7 @@ void UASWaypointManager::handleLocalPositionChanged(UASInterface* mav, double x, { Q_UNUSED(mav); Q_UNUSED(time); - if (waypoints.count() > 0 && currentWaypoint && (currentWaypoint->getFrame() == MAV_FRAME_LOCAL || currentWaypoint->getFrame() == MAV_FRAME_LOCAL_ENU)) + if (waypoints.count() > 0 && currentWaypoint && (currentWaypoint->getFrame() == MAV_FRAME_LOCAL_NED || currentWaypoint->getFrame() == MAV_FRAME_LOCAL_ENU)) { double xdiff = x-currentWaypoint->getX(); double ydiff = y-currentWaypoint->getY(); diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index 313ac7f4b..3060c0fbe 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -1190,7 +1190,7 @@ void MainWindow::UASCreated(UASInterface* uas) { // Center widgets linechartWidget = new Linecharts(this); - //linechartWidget FIXME + linechartWidget->addSource(mavlinkDecoder); addCentralWidget(linechartWidget, tr("Realtime Plot")); } -- 2.22.0