]> git.mxchange.org Git - flightgear.git/commitdiff
Fix issues with explicit GPS instruments.
authorJames Turner <zakalawe@mac.com>
Mon, 17 Jun 2013 17:11:47 +0000 (18:11 +0100)
committerJames Turner <zakalawe@mac.com>
Mon, 17 Jun 2013 17:11:47 +0000 (18:11 +0100)
For 2.12, ensure all GPS instruments are backwards
compatible, however they were requested. Post release we can create a new instrument name with the compatibility code disabled.

src/Instrumentation/instrument_mgr.cxx

index ec8aa69ec10d8a7a649292ca6fb6c34948a3dabe..80724e3a651c82bfdc5ecc2147ba393bdd80c495 100644 (file)
@@ -142,7 +142,11 @@ bool FGInstrumentMgr::build (SGPropertyNode* config_props)
             set_subsystem( id, new Altimeter( node, "encoder" ), 0.15 );
 
         } else if ( name == "gps" ) {
-            set_subsystem( id, new GPS( node ) );
+            // post 2.12.0, add a new name (distinct from 'gps'), so
+            // it is possible to create non-default GPS instruments.
+            // then authors of realistic GPS and FMSs can transition to using
+            // that name as they choose.
+            set_subsystem( id, new GPS( node, true /* default GPS mode */ ) );
             _explicitGps = true;
         } else if ( name == "gsdi" ) {
             set_subsystem( id, new GSDI( node ) );