[swift] Enhancing version compatibility check
This commit is contained in:
parent
fc0a8b1c60
commit
e6a9515b59
2 changed files with 5 additions and 5 deletions
|
@ -31,12 +31,13 @@
|
|||
#include <simgear/structure/subsystem_mgr.hxx>
|
||||
#include <simgear/timing/timestamp.hxx>
|
||||
|
||||
#define FGSWIFTBUS_API_VERSION 1;
|
||||
|
||||
namespace FGSwiftBus {
|
||||
|
||||
CService::CService()
|
||||
{
|
||||
// Initialize node pointers
|
||||
versionNode = fgGetNode("/sim/version/flightgear");
|
||||
textMessageNode = fgGetNode("/sim/messages/copilot");
|
||||
aircraftModelPathNode = fgGetNode("/sim/aircraft-dir");
|
||||
aircraftDescriptionNode = fgGetNode("/sim/description");
|
||||
|
@ -85,9 +86,9 @@ const std::string& CService::ObjectPath()
|
|||
}
|
||||
|
||||
// Static method
|
||||
std::string CService::getVersionNumber()
|
||||
int CService::getVersionNumber()
|
||||
{
|
||||
return fgGetString("/sim/version/flightgear");
|
||||
return FGSWIFTBUS_API_VERSION;
|
||||
}
|
||||
|
||||
void CService::addTextMessage(const std::string& text)
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
static const std::string& ObjectPath();
|
||||
|
||||
//! Getting flightgear version
|
||||
static std::string getVersionNumber();
|
||||
static int getVersionNumber();
|
||||
|
||||
////! Add a text message to the on-screen display, with RGB components in the range [0,1]
|
||||
void addTextMessage(const std::string& text);
|
||||
|
@ -203,7 +203,6 @@ protected:
|
|||
DBusHandlerResult dbusMessageHandler(const CDBusMessage& message) override;
|
||||
|
||||
private:
|
||||
SGPropertyNode* versionNode;
|
||||
SGPropertyNode* textMessageNode;
|
||||
SGPropertyNode* aircraftModelPathNode;
|
||||
//SGPropertyNode* aircraftLiveryNode;
|
||||
|
|
Loading…
Add table
Reference in a new issue