// Local functions
////////////////////////////////////////////////////////////////////////
+
/**
* Initialize the BFI by binding its functions to properties.
*
fgTie("/autopilot/settings/altitude", getAPAltitude, setAPAltitude);
fgTie("/autopilot/locks/heading", getAPHeadingLock, setAPHeadingLock);
fgTie("/autopilot/settings/heading", getAPHeading, setAPHeading);
- fgTie("/autopilot/settings/heading-dg", getAPHeadingDG, setAPHeadingDG);
+ fgTie("/autopilot/settings/heading-dg", getAPHeadingDG, setAPHeadingDG, false);
fgTie("/autopilot/settings/heading-magnetic",
getAPHeadingMag, setAPHeadingMag);
fgTie("/autopilot/locks/nav1", getAPNAV1Lock, setAPNAV1Lock);
{
return
(current_autopilot->get_HeadingEnabled() &&
- current_autopilot->get_HeadingMode() == FGAutopilot::FG_HEADING_LOCK);
+ current_autopilot->get_HeadingMode() == FGAutopilot::FG_DG_HEADING_LOCK);
}
// heading other than the current
// heading.
double heading = getAPHeadingMag();
- current_autopilot->set_HeadingMode(FGAutopilot::FG_HEADING_LOCK);
+ current_autopilot->set_HeadingMode(FGAutopilot::FG_DG_HEADING_LOCK);
current_autopilot->set_HeadingEnabled(true);
setAPHeadingMag(heading);
} else if (current_autopilot->get_HeadingMode() ==
- FGAutopilot::FG_HEADING_LOCK) {
+ FGAutopilot::FG_DG_HEADING_LOCK) {
current_autopilot->set_HeadingEnabled(false);
}
}