From: curt Date: Wed, 14 Mar 2001 14:35:27 +0000 (+0000) Subject: ADF needle doesn't zero when it goes out of range. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e754177bdf4b6c8db0b2582bce73f01127381977;p=flightgear.git ADF needle doesn't zero when it goes out of range. --- diff --git a/src/Cockpit/steam.cxx b/src/Cockpit/steam.cxx index af1a58896..00e82c1c5 100644 --- a/src/Cockpit/steam.cxx +++ b/src/Cockpit/steam.cxx @@ -200,7 +200,7 @@ void FGSteam::_CatchUp() { double dt = _UpdatesPending * 1.0 / fgGetInt("/sim/model-hz"); // FIXME: inefficient double AccN, AccE, AccU; - int i /*,j*/; + /* int i, j; */ double d, the_ENGINE_rpm; #if 0 @@ -484,18 +484,18 @@ double FGSteam::get_HackOBS2_deg () { double FGSteam::get_HackADF_deg () { + static double last_r = 0; double r; if ( current_radiostack->get_adf_inrange() ) { - r = current_radiostack->get_adf_heading() - FGBFI::getHeading(); - + double r = current_radiostack->get_adf_heading() - FGBFI::getHeading(); + last_r = r; // cout << "Radial = " << current_radiostack->get_adf_heading() // << " Heading = " << FGBFI::getHeading() << endl; + return r; } else { - r = 0.0; + return last_r; } - - return r; }