Commit 431db26b authored by Lorenz Meier's avatar Lorenz Meier

Merge pull request #529 from julianoes/wp_fixes

WP bugfixes
parents 3bed19df 0c1774a8
......@@ -225,6 +225,17 @@ void UASWaypointManager::handleWaypointAck(quint8 systemId, quint8 compId, mavli
current_state = WP_IDLE;
readWaypoints(false); //Update "Onboard Waypoints"-tab immidiately after the waypoint list has been sent.
emit updateStatusString("done.");
} else if((current_state == WP_SENDLIST || current_state == WP_SENDLIST_SENDWPS) && wpa->type != 0) {
//give up transmitting if a WP is rejected
if (wpa->type == 1) {
emit updateStatusString("upload failed: general error");
} else if (wpa->type == 2) {
emit updateStatusString("upload failed: coordinate frame unsupported.");
} else {
emit updateStatusString("upload failed: other error.");
}
protocol_timer.stop();
current_state = WP_IDLE;
} else if(current_state == WP_CLEARLIST) {
protocol_timer.stop();
current_state = WP_IDLE;
......@@ -905,7 +916,7 @@ void UASWaypointManager::writeWaypoints()
sendWaypointCount();
} else if (waypointsEditable.count() == 0)
{
sendWaypointClearAll();
clearWaypointList();
}
}
else
......
......@@ -283,9 +283,9 @@ void WaypointList::addEditable(bool onCurrentPosition)
wp->setZ(last->getZ());
}
wp->setParam1(last->getParam1());
wp->setParam1(last->getParam2());
wp->setParam1(last->getParam3());
wp->setParam1(last->getParam4());
wp->setParam2(last->getParam2());
wp->setParam3(last->getParam3());
wp->setParam4(last->getParam4());
wp->setAutocontinue(last->getAutoContinue());
// wp->blockSignals(false);
wp->setAction(last->getAction());
......
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