low_tbl = new SGInterpTable( low.str() );
high_tbl = new SGInterpTable( high.str() );
- int i;
- for ( i = 0; i < node->nChildren(); ++i ) {
+ for ( int i = 0; i < node->nChildren(); ++i ) {
SGPropertyNode *child = node->getChild(i);
string cname = child->getName();
string cval = child->getStringValue();
audio_vol = node->getChild("volume", 0, true);
serviceable = node->getChild("serviceable", 0, true);
- power_btn->setBoolValue( true );
- audio_btn->setBoolValue( true );
- serviceable->setBoolValue( true );
+ if (power_btn->getType() == SGPropertyNode::NONE)
+ power_btn->setBoolValue( true );
+ if (audio_btn->getType() == SGPropertyNode::NONE)
+ audio_btn->setBoolValue( true );
+ if (serviceable->getType() == SGPropertyNode::NONE)
+ serviceable->setBoolValue( true );
morse.init();
beacon.init();
_time_before_search_sec -= dt;
if ( _time_before_search_sec < 0 ) {
- search();
+ search();
}
if ( has_power() && serviceable->getBoolValue()
class BeaconFilter : public FGPositioned::Filter
{
-public:
+public:
virtual FGPositioned::Type minType() const {
return FGPositioned::OM;
}
// get closest marker beacon - within a 1nm cutoff
BeaconFilter filter;
FGPositionedRef b = FGPositioned::findClosest(pos, 1.0, &filter);
-
+
fgMkrBeacType beacon_type = NOBEACON;
bool inrange = false;
if ( b != NULL ) {