mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-05 09:45:44 +08:00
refs #808, adjusted FSUIPC class
This commit is contained in:
@@ -36,7 +36,6 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
namespace FsCommon
|
namespace FsCommon
|
||||||
{
|
{
|
||||||
|
|
||||||
CFsuipc::CFsuipc()
|
CFsuipc::CFsuipc()
|
||||||
{
|
{
|
||||||
startTimer(100);
|
startTimer(100);
|
||||||
@@ -67,7 +66,7 @@ namespace BlackSimPlugin
|
|||||||
.arg(QLatin1Char(48 + (0x0f & (FSUIPC_Version >> 16))))
|
.arg(QLatin1Char(48 + (0x0f & (FSUIPC_Version >> 16))))
|
||||||
.arg((FSUIPC_Version & 0xffff) ? QString(QLatin1Char('a' + (FSUIPC_Version & 0xff) - 1)) : "");
|
.arg((FSUIPC_Version & 0xffff) ? QString(QLatin1Char('a' + (FSUIPC_Version & 0xff) - 1)) : "");
|
||||||
this->m_fsuipcVersion = QString("FSUIPC %1 (%2)").arg(ver).arg(sim);
|
this->m_fsuipcVersion = QString("FSUIPC %1 (%2)").arg(ver).arg(sim);
|
||||||
// CLogMessage(this).info("FSUIPC connected: %1") << this->m_fsuipcVersion;
|
CLogMessage(this).info("FSUIPC connected: %1") << this->m_fsuipcVersion;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ namespace BlackSimPlugin
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CFsuipc();
|
CFsuipc();
|
||||||
|
|
||||||
@@ -51,6 +50,9 @@ namespace BlackSimPlugin
|
|||||||
//! Write weather grid to simulator
|
//! Write weather grid to simulator
|
||||||
bool write(const BlackMisc::Weather::CWeatherGrid &weatherGrid);
|
bool write(const BlackMisc::Weather::CWeatherGrid &weatherGrid);
|
||||||
|
|
||||||
|
//! Get the version
|
||||||
|
QString getVersion() const { return m_fsuipcVersion; }
|
||||||
|
|
||||||
//! Read data from FSUIPC
|
//! Read data from FSUIPC
|
||||||
//! \param aircraft object to be updated
|
//! \param aircraft object to be updated
|
||||||
//! \param cockpit update cockpit data
|
//! \param cockpit update cockpit data
|
||||||
@@ -60,9 +62,6 @@ namespace BlackSimPlugin
|
|||||||
//!
|
//!
|
||||||
bool read(BlackMisc::Simulation::CSimulatedAircraft &aircraft, bool cockpit, bool situation, bool aircraftParts);
|
bool read(BlackMisc::Simulation::CSimulatedAircraft &aircraft, bool cockpit, bool situation, bool aircraftParts);
|
||||||
|
|
||||||
//! Find out whether we can connect to FSUIPC or not
|
|
||||||
static bool canConnect();
|
|
||||||
|
|
||||||
//! Error messages
|
//! Error messages
|
||||||
static const QStringList &errorMessages()
|
static const QStringList &errorMessages()
|
||||||
{
|
{
|
||||||
@@ -129,7 +128,6 @@ namespace BlackSimPlugin
|
|||||||
|
|
||||||
//! Integer representing fractional
|
//! Integer representing fractional
|
||||||
static double intToFractional(double fractional);
|
static double intToFractional(double fractional);
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user