From 7714d153669754bbc4e36fdd610f353cb399a815 Mon Sep 17 00:00:00 2001 From: pixhawk Date: Wed, 16 Jun 2010 18:20:06 +0200 Subject: [PATCH] removed debug messages --- src/uas/UAS.cc | 2 +- src/uas/UASWaypointManager.cc | 2 -- src/ui/WaypointList.cc | 9 +++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 19b1686..b313578 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -428,7 +428,7 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) { mavlink_waypoint_t wp; mavlink_msg_waypoint_decode(&message, &wp); - qDebug() << "got waypoint (" << wp.seq << ") from ID " << message.sysid << " x=" << wp.x << " y=" << wp.y << " z=" << wp.z; + //qDebug() << "got waypoint (" << wp.seq << ") from ID " << message.sysid << " x=" << wp.x << " y=" << wp.y << " z=" << wp.z; if(wp.target_system == mavlink->getSystemId() && wp.target_component == mavlink->getComponentId()) { waypointManager.handleWaypoint(message.sysid, message.compid, &wp); diff --git a/src/uas/UASWaypointManager.cc b/src/uas/UASWaypointManager.cc index 8784eb3..03ad97f 100644 --- a/src/uas/UASWaypointManager.cc +++ b/src/uas/UASWaypointManager.cc @@ -37,8 +37,6 @@ void UASWaypointManager::handleWaypoint(quint8 systemId, quint8 compId, mavlink_ { if (systemId == current_partner_systemid && compId == current_partner_compid && current_state == WP_GETLIST_GETWPS && wp->seq == current_wp_id) { - qDebug() << "got waypoint (" << wp->seq << ") from ID " << systemId << " x=" << wp->x << " y=" << wp->y << " z=" << wp->z; - if(wp->seq == current_wp_id) { //update the UI FIXME diff --git a/src/ui/WaypointList.cc b/src/ui/WaypointList.cc index 5a7d420..eef95b0 100644 --- a/src/ui/WaypointList.cc +++ b/src/ui/WaypointList.cc @@ -159,8 +159,7 @@ void WaypointList::read() { removeWaypoint(waypoints[0]); } - - redrawList(); + emit requestWaypoints(); } @@ -170,6 +169,7 @@ void WaypointList::transmit() m_ui->transmitButton->setEnabled(false); emit sendWaypoints(waypoints); + //emit requestWaypoints(); FIXME } void WaypointList::add() @@ -179,17 +179,18 @@ void WaypointList::add() { if (waypoints.size() > 0) { - addWaypoint(new Waypoint(waypoints.size(), 0.0, 0.1, -0.5, 0.0, false, false)); + addWaypoint(new Waypoint(waypoints.size(), 0.0, 0.0, -0.0, 0.0, false, false)); } else { - addWaypoint(new Waypoint(waypoints.size(), 0.0, 0.0, -0.5, 360.0, false, true)); + addWaypoint(new Waypoint(waypoints.size(), 0.0, 0.0, -0.0, 0.0, false, true)); } } } void WaypointList::addWaypoint(Waypoint* wp) { + waypoints.push_back(wp); if (!wpViews.contains(wp)) { WaypointView* wpview = new WaypointView(wp, this);