From 1e92c33a9e20b3fd34db4878a21623332060f9c7 Mon Sep 17 00:00:00 2001 From: Henning Stahlke Date: Tue, 7 Mar 2017 20:45:46 +0100 Subject: [PATCH] YASim export config version used by aircraft to property tree. Gives /fdm/yasim/config-version as integer (see enum in Version.hpp to decode). --- src/FDM/YASim/FGFDM.cpp | 1 + src/FDM/YASim/Version.hpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/FDM/YASim/FGFDM.cpp b/src/FDM/YASim/FGFDM.cpp index 4c69ff51c..28942e81e 100644 --- a/src/FDM/YASim/FGFDM.cpp +++ b/src/FDM/YASim/FGFDM.cpp @@ -130,6 +130,7 @@ void FGFDM::init() // alias to older name fgGetNode("/yasim/gross-weight-lbs", true)->alias(_gross_weight_lbs); + _yasimN->getNode("config-version",true)->setIntValue(_airplane.getVersion()); _cg_x = _yasimN->getNode("cg-x-m", true); _cg_y = _yasimN->getNode("cg-y-m", true); _cg_z = _yasimN->getNode("cg-z-m", true); diff --git a/src/FDM/YASim/Version.hpp b/src/FDM/YASim/Version.hpp index 101a3de63..0c56f06a6 100644 --- a/src/FDM/YASim/Version.hpp +++ b/src/FDM/YASim/Version.hpp @@ -16,6 +16,7 @@ public: } YASIM_VERSION; void setVersion( const char * version ); + int getVersion() { return _version; } bool isVersion( YASIM_VERSION version ); bool isVersionOrNewer( YASIM_VERSION version );