X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Finstrument_mgr.cxx;h=c6694173f77565a21e2a113230fdb6d48d7c10ec;hb=1fb790eb60bc36456d7fa58d04d410873eb58810;hp=19fcaeb066ea21386d1fb4a4e2ae932b3ba3c9e0;hpb=02fb83c774020633cb62e3b8154337510bed1de3;p=flightgear.git diff --git a/src/Instrumentation/instrument_mgr.cxx b/src/Instrumentation/instrument_mgr.cxx index 19fcaeb06..c6694173f 100644 --- a/src/Instrumentation/instrument_mgr.cxx +++ b/src/Instrumentation/instrument_mgr.cxx @@ -14,6 +14,7 @@ #include #include #include +#include #include
#include
@@ -36,7 +37,7 @@ #include "kt_70.hxx" #include "mag_compass.hxx" #include "marker_beacon.hxx" -#include "navradio.hxx" +#include "newnavradio.hxx" #include "slip_skid_ball.hxx" #include "transponder.hxx" #include "turn_indicator.hxx" @@ -50,6 +51,8 @@ #include "groundradar.hxx" #include "agradar.hxx" #include "rad_alt.hxx" +#include "tcas.hxx" +#include "NavDisplay.hxx" FGInstrumentMgr::FGInstrumentMgr () : _explicitGps(false) @@ -78,13 +81,13 @@ void FGInstrumentMgr::init() try { readProperties( config.str(), config_props ); if (!build(config_props)) { - throw sg_error( + throw sg_exception( "Detected an internal inconsistency in the instrumentation\n" "system specification file. See earlier errors for details."); } - } catch (const sg_exception&) { + } catch (const sg_exception& e) { SG_LOG(SG_COCKPIT, SG_ALERT, "Failed to load instrumentation system model: " - << config.str() ); + << config.str() << ":" << e.getFormattedMessage() ); } @@ -185,7 +188,7 @@ bool FGInstrumentMgr::build (SGPropertyNode* config_props) set_subsystem( id, new FGMarkerBeacon( node ) ); } else if ( name == "nav-radio" ) { - set_subsystem( id, new FGNavRadio( node ) ); + set_subsystem( id, Instrumentation::NavRadio::createInstance( node ) ); } else if ( name == "slip-skid-ball" ) { set_subsystem( id, new SlipSkidBall( node ) ); @@ -223,6 +226,12 @@ bool FGInstrumentMgr::build (SGPropertyNode* config_props) } else if ( name == "radar-altimeter" ) { set_subsystem( id, new radAlt( node ),1); + } else if ( name == "tcas" ) { + set_subsystem( id, new TCAS( node ) ); + + } else if ( name == "navigation-display" ) { + set_subsystem( id, new NavDisplay( node ) ); + } else { SG_LOG( SG_ALL, SG_ALERT, "Unknown top level section: " << name );