Allow the route-manager to be explicitly de-activated.
if (activate) {
self->activate();
} else {
-
+ self->deactivate();
}
return true;
return true;
}
+void FGRouteMgr::deactivate()
+{
+ if (!isRouteActive()) {
+ return;
+ }
+
+ SG_LOG(SG_AUTOPILOT, SG_INFO, "deactivating flight plan");
+ active->setBoolValue(false);
+}
void FGRouteMgr::sequence()
{
* route could not be activated for some reason
*/
bool activate();
+
+ /**
+ * deactivate the route if active
+ */
+ void deactivate();
/**
* Step to the next waypoint on the active route