X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fmarker_beacon.cxx;h=41b981536a6262e6da037e66b03e5523bda64518;hb=4a94071ed78efdb6c8a9c5d44102dd48a001d920;hp=5fa56fadef3d3379887e87baee19ba4857f78947;hpb=312447c565ec410f52353ba22d305cf470e9ba33;p=flightgear.git diff --git a/src/Instrumentation/marker_beacon.cxx b/src/Instrumentation/marker_beacon.cxx index 5fa56fade..41b981536 100644 --- a/src/Instrumentation/marker_beacon.cxx +++ b/src/Instrumentation/marker_beacon.cxx @@ -43,7 +43,6 @@ using std::string; // Constructor FGMarkerBeacon::FGMarkerBeacon(SGPropertyNode *node) : audio_vol(NULL), - need_update(true), outer_blink(false), middle_blink(false), inner_blink(false), @@ -121,12 +120,17 @@ FGMarkerBeacon::init () _sgr = smgr->find("avionics", true); _sgr->tie_to_listener(); - blink.stamp(); + reinit(); +} +void +FGMarkerBeacon::reinit () +{ + blink.stamp(); outer_marker = middle_marker = inner_marker = false; + _time_before_search_sec = 0.0; } - void FGMarkerBeacon::bind () { @@ -160,8 +164,6 @@ FGMarkerBeacon::unbind () void FGMarkerBeacon::update(double dt) { - need_update = false; - // On timeout, scan again, this needs to run every iteration no // matter what the power or serviceable state. If power is turned // off or the unit becomes unserviceable while a beacon sound is