X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Fmarker_beacon.cxx;h=5fa56fadef3d3379887e87baee19ba4857f78947;hb=5a05e30abd3542b288c09e401a8aee3c5097bf57;hp=d2e9774b702dacc4f0c6a81eaa4172d609e7fff5;hpb=f9445874a02689cbd9a0197c5aac7ffeab1436ac;p=flightgear.git diff --git a/src/Instrumentation/marker_beacon.cxx b/src/Instrumentation/marker_beacon.cxx index d2e9774b7..5fa56fade 100644 --- a/src/Instrumentation/marker_beacon.cxx +++ b/src/Instrumentation/marker_beacon.cxx @@ -31,10 +31,10 @@ #include #include -#include #include #include "marker_beacon.hxx" +#include #include using std::string; @@ -100,7 +100,7 @@ FGMarkerBeacon::init () SGPropertyNode *node = fgGetNode(branch.c_str(), num, true ); // Inputs - sound_pause = fgGetNode("/sim/sound/pause", false); + sound_working = fgGetNode("/sim/sound/working", true); lon_node = fgGetNode("/position/longitude-deg", true); lat_node = fgGetNode("/position/latitude-deg", true); alt_node = fgGetNode("/position/altitude-ft", true); @@ -121,8 +121,6 @@ FGMarkerBeacon::init () _sgr = smgr->find("avionics", true); _sgr->tie_to_listener(); - morse.init(); - beacon.init(); blink.stamp(); outer_marker = middle_marker = inner_marker = false; @@ -176,7 +174,7 @@ FGMarkerBeacon::update(double dt) } if ( has_power() && serviceable->getBoolValue() - && !sound_pause->getBoolValue()) { + && sound_working->getBoolValue()) { // marker beacon blinking bool light_on = ( outer_blink || middle_blink || inner_blink ); @@ -318,7 +316,7 @@ void FGMarkerBeacon::search() // cout << "OUTER MARKER" << endl; if ( last_beacon != OUTER ) { if ( ! _sgr->exists( current_sound_name ) ) { - SGSoundSample *sound = beacon.get_outer(); + SGSoundSample *sound = FGBeacon::instance()->get_outer(); if ( sound ) { _sgr->add( sound, current_sound_name ); } @@ -337,7 +335,7 @@ void FGMarkerBeacon::search() // cout << "MIDDLE MARKER" << endl; if ( last_beacon != MIDDLE ) { if ( ! _sgr->exists( current_sound_name ) ) { - SGSoundSample *sound = beacon.get_middle(); + SGSoundSample *sound = FGBeacon::instance()->get_middle(); if ( sound ) { _sgr->add( sound, current_sound_name ); } @@ -356,7 +354,7 @@ void FGMarkerBeacon::search() // cout << "INNER MARKER" << endl; if ( last_beacon != INNER ) { if ( ! _sgr->exists( current_sound_name ) ) { - SGSoundSample *sound = beacon.get_inner(); + SGSoundSample *sound = FGBeacon::instance()->get_inner(); if ( sound ) { _sgr->add( sound, current_sound_name ); }