mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 07:35:41 +08:00
[xswiftbus] display FPS in simulator data window
* added driver getAverageFPS function * display in simulator component
This commit is contained in:
committed by
Mat Sutcliffe
parent
548a12a502
commit
72c3abb1e7
@@ -103,7 +103,7 @@ namespace BlackCore
|
||||
virtual bool connectTo() = 0;
|
||||
|
||||
//! Disconnect from simulator
|
||||
virtual bool disconnectFrom() = 0;
|
||||
virtual bool disconnectFrom();
|
||||
|
||||
//! Logically add a new aircraft.
|
||||
//! Depending on max. aircraft, enabled status etc. it will physically added to the simulator.
|
||||
@@ -215,6 +215,9 @@ namespace BlackCore
|
||||
//! Test mode?
|
||||
bool isTestMode() const { return m_test; }
|
||||
|
||||
//! Average FPS (frames per second)
|
||||
double getAverageFPS() const { return m_averageFps; }
|
||||
|
||||
//! Send situation/parts for testing
|
||||
virtual bool testSendSituationAndParts(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftSituation &situation, const BlackMisc::Aviation::CAircraftParts &parts) = 0;
|
||||
|
||||
@@ -575,6 +578,7 @@ namespace BlackCore
|
||||
int m_statsUpdateAircraftRuns = 0; //!< statistics update count
|
||||
int m_statsUpdateAircraftLimited = 0; //!< skipped because of max.update limitations
|
||||
double m_statsUpdateAircraftTimeAvgMs = 0; //!< statistics average update time
|
||||
double m_averageFps = -1.0; //!< FPS
|
||||
qint64 m_updateAllRemoteAircraftUntil = 0; //!< force an update of all remote aircraft, used when own aircraft is moved, paused to make sure all remote aircraft are updated
|
||||
qint64 m_statsUpdateAircraftTimeTotalMs = 0; //!< statistics total update time
|
||||
qint64 m_statsCurrentUpdateTimeMs = 0; //!< statistics current update time
|
||||
|
||||
Reference in New Issue
Block a user