]> git.mxchange.org Git - flightgear.git/commitdiff
Make sure when setting autopilot heading via the menu that the current
authorcurt <curt>
Wed, 27 Feb 2002 18:05:17 +0000 (18:05 +0000)
committercurt <curt>
Wed, 27 Feb 2002 18:05:17 +0000 (18:05 +0000)
heading value is presented between 0 and 360.

src/Autopilot/auto_gui.cxx

index 642ed357962043327ce960ef3b900c3eb9c347ad..20ccc7bedd5f46aaf4669f93928eab642e93c876 100644 (file)
@@ -220,6 +220,7 @@ void NewHeading(puObject *cb)
     // string ApHeadingLabel( "Enter New Heading" );
     // ApHeadingDialogMessage  -> setLabel(ApHeadingLabel.c_str());
     float heading = current_autopilot->get_DGTargetHeading();
+    while ( heading < 0.0 ) { heading += 360.0; }
     ApHeadingDialogInput   ->    setValue ( heading );
     ApHeadingDialogInput    -> acceptInput();
     FG_PUSH_PUI_DIALOG( ApHeadingDialog );