From baa16f49958e9056e3aa90674b116301b78be6c9 Mon Sep 17 00:00:00 2001 From: mfranz Date: Wed, 22 Nov 2006 20:08:45 +0000 Subject: [PATCH] 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) --- src/Instrumentation/adf.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;