#include <simgear/math/sg_random.h>
#include <simgear/misc/sg_path.hxx>
-#include <Aircraft/aircraft.hxx>
#include <Navaids/navlist.hxx>
#include "marker_beacon.hxx"
+#include <Sound/beacon.hxx>
#include <string>
using std::string;
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);
_sgr = smgr->find("avionics", true);
_sgr->tie_to_listener();
- morse.init();
- beacon.init();
blink.stamp();
outer_marker = middle_marker = inner_marker = false;
}
if ( has_power() && serviceable->getBoolValue()
- && !sound_pause->getBoolValue()) {
+ && sound_working->getBoolValue()) {
// marker beacon blinking
bool light_on = ( outer_blink || middle_blink || inner_blink );
// 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 );
}
// 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 );
}
// 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 );
}