From: mfranz Date: Wed, 22 Nov 2006 20:08:45 +0000 (+0000) Subject: AJ MacLEOD: don't only turn the adf off with exactly zero voltage X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=baa16f49958e9056e3aa90674b116301b78be6c9;p=flightgear.git AJ MacLEOD: don't only turn the adf off with exactly zero voltage as values like 1E-10 can occur due to binary representation issues; (analog to navradio.cxx) --- diff --git a/src/Instrumentation/adf.cxx b/src/Instrumentation/adf.cxx index de82dfd55..114f0b658 100644 --- a/src/Instrumentation/adf.cxx +++ b/src/Instrumentation/adf.cxx @@ -111,8 +111,8 @@ void ADF::update (double delta_time_sec) { // If it's off, don't waste any time. - if (!_electrical_node->getBoolValue() || - !_serviceable_node->getBoolValue()) { + if (_electrical_node->getDoubleValue() < 1.0 + || !_serviceable_node->getBoolValue()) { set_bearing(delta_time_sec, 90); _ident_node->setStringValue(""); return;