]> git.mxchange.org Git - flightgear.git/commitdiff
The switch position was screwed up -- 2 means "hold last frequency",
authordavid <david>
Thu, 6 Feb 2003 16:17:47 +0000 (16:17 +0000)
committerdavid <david>
Thu, 6 Feb 2003 16:17:47 +0000 (16:17 +0000)
not "off".

src/Cockpit/dme.cxx
src/Cockpit/dme.hxx

index cc18217d994c7eee58d660f4872e0277c297b5cd..aa07a7559ac15540e47bf6f7fe3f7cbd66435f21 100644 (file)
@@ -212,6 +212,8 @@ void FGDME::search()
             freq = navcom2_freq->getDoubleValue();
             need_update = true;
         }
+    } else if ( switch_pos == 2 && has_power() ) {
+        // no-op
     } else {
         freq = 0;
         inrange = false;
index b8280adaa14b321b5a51e0792129a175daf0640f..e16acfe7ed8d591853cb7bd5d9cac0fe9677e62c 100644 (file)
@@ -93,7 +93,7 @@ public:
 
     // DME Accessors
     inline bool has_power() const {
-        return (switch_pos == 1 || switch_pos == 3)
+        return (switch_pos > 0)
             && (bus_power->getDoubleValue() > 1.0);
     }
     inline bool navcom1_on() const {