Ref T723 [xswiftbus] Expose configuration to enable/disable TCAS traffic

This commit is contained in:
Mat Sutcliffe
2019-12-27 21:40:15 +00:00
parent 8d204cded1
commit 0f6b7d910e
6 changed files with 31 additions and 0 deletions

View File

@@ -41,6 +41,11 @@ namespace BlackMisc
m_debug = on;
}
void CXSwiftBusConfigWriter::setTcasEnabled(bool on)
{
m_tcas = on;
}
void CXSwiftBusConfigWriter::updateInAllXPlaneVersions()
{
updateInXPlane9();
@@ -85,6 +90,9 @@ namespace BlackMisc
ts << endl;
ts << "# Render phase debugging - to help diagnose crashes" << endl;
ts << "debug = " << boolToOnOff(m_debug) << endl;
ts << endl;
ts << "# TCAS traffic - to disable in case of crashes" << endl;
ts << "tcas = " << boolToOnOff(m_debug) << endl;
}
}
} // ns

View File

@@ -36,6 +36,9 @@ namespace BlackMisc
//! Set debug on/off
void setDebugMode(bool on);
//! Set TCAS on/off
void setTcasEnabled(bool on);
//! Update xswiftbus.conf in all known X-Plane versions (XP9 - XP11 are supported)
void updateInAllXPlaneVersions();
@@ -56,6 +59,7 @@ namespace BlackMisc
QString m_dbusAddress = "127.0.0.1";
QString m_dbusPort = "45001";
bool m_debug = false;
bool m_tcas = true;
};
}
}