From: david Date: Thu, 6 Feb 2003 16:17:47 +0000 (+0000) Subject: The switch position was screwed up -- 2 means "hold last frequency", X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fbfb499d496ab5dc9a3ea1f88e1094edac8a97f2;p=flightgear.git The switch position was screwed up -- 2 means "hold last frequency", not "off". --- diff --git a/src/Cockpit/dme.cxx b/src/Cockpit/dme.cxx index cc18217d9..aa07a7559 100644 --- a/src/Cockpit/dme.cxx +++ b/src/Cockpit/dme.cxx @@ -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; diff --git a/src/Cockpit/dme.hxx b/src/Cockpit/dme.hxx index b8280adaa..e16acfe7e 100644 --- a/src/Cockpit/dme.hxx +++ b/src/Cockpit/dme.hxx @@ -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 {