]> git.mxchange.org Git - flightgear.git/commitdiff
Fix an init order bug and do some minor cleanups.
authorcurt <curt>
Wed, 16 Oct 2002 02:02:39 +0000 (02:02 +0000)
committercurt <curt>
Wed, 16 Oct 2002 02:02:39 +0000 (02:02 +0000)
src/Cockpit/dme.cxx
src/Cockpit/kr_87.cxx
src/Cockpit/kt_70.cxx
src/Cockpit/marker_beacon.cxx
src/Cockpit/navcom.cxx

index b6e5fbe41f7d7dbfcada907a2396bdfcfa091bcc..bc00b0f51b4e66111f783ff7bfa3b02ea86119c7 100644 (file)
@@ -99,8 +99,6 @@ FGDME::~FGDME()
 void
 FGDME::init ()
 {
-    search();
-    update(0);                 // FIXME: use dt
 }
 
 void
index aef0736de7e3563e045eb902fb26e8f85e6e0ae2..67a0586dbf341ae13d53f58ab928e8525f079cc2 100644 (file)
@@ -114,8 +114,6 @@ FGKR_87::~FGKR_87() {
 
 void FGKR_87::init () {
     morse.init();
-
-    update(0);                 // FIXME: use dt
 }
 
 
index 4124ffef8a19d3005b478801b54f8eaa44db392e..652eb3c25c621bb1574067e0637cab443cf639ea 100644 (file)
@@ -64,7 +64,6 @@ FGKT_70::~FGKT_70() { }
 
 
 void FGKT_70::init () {
-    update(0);                 // FIXME: use dt
 }
 
 
index 941d1e2b4e9e70d127010dacda3d43535edc3346..8f0475914aba5c5211cd36d60490eaf03391c285 100644 (file)
@@ -104,9 +104,6 @@ FGMarkerBeacon::init ()
     morse.init();
     beacon.init();
     blink.stamp();
-
-    search();
-    update(0);                 // FIXME: use dt
 }
 
 
index 6a1adfca43736747d2569d2fcbf6411b56674749..665f8b3bc71bd1f242b8fa876235c70ecc349666 100644 (file)
@@ -90,9 +90,13 @@ FGNavCom::init ()
 {
     morse.init();
 
-    search();
-
-    update(0);                 // FIXME: use dt
+    // We assume that index is valid now (it must be set before init()
+    // is called.)
+    char propname[256];
+    sprintf( propname, "/systems/electrical/outputs/navcom[%d]", index );
+    // default to true in case no electrical system defined.
+    fgSetDouble( propname, 60.0 );
+    bus_power = fgGetNode( propname, true );
 }
 
 void
@@ -165,13 +169,6 @@ FGNavCom::bind ()
     fgTie( propname, this, &FGNavCom::get_nav_gs_needle_deflection );
 
     // end of binding
-
-    // We know index is valid now so lets bind to the bus property
-    // here.
-    sprintf( propname, "/systems/electrical/outputs/navcom[%d]", index );
-    // default to true in case no electrical system defined.
-    fgSetDouble( propname, 60.0 );
-    bus_power = fgGetNode( propname, true );
 }