1
0
Fork 0

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)
This commit is contained in:
mfranz 2006-11-22 20:08:45 +00:00
parent 2e32ccf393
commit baa16f4995

View file

@ -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;