mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Issue #37 Reset FPS counter when network is connected
This commit is contained in:
@@ -226,6 +226,15 @@ namespace BlackSimPlugin
|
||||
CSimulatorPluginCommon::callbackReceivedRequestedElevation(plane, callsign, isWater);
|
||||
}
|
||||
|
||||
void CSimulatorXPlane::setFlightNetworkConnected(bool connected)
|
||||
{
|
||||
if (connected && !this->isShuttingDownOrDisconnected())
|
||||
{
|
||||
m_serviceProxy->resetFrameTotals();
|
||||
}
|
||||
CSimulatorPluginCommon::setFlightNetworkConnected(connected);
|
||||
}
|
||||
|
||||
bool CSimulatorXPlane::isSuspiciousTerrainValue(const CElevationPlane &elevation)
|
||||
{
|
||||
if (!elevation.hasMSLGeodeticHeight()) { return true; }
|
||||
|
||||
@@ -146,6 +146,7 @@ namespace BlackSimPlugin
|
||||
virtual bool testSendSituationAndParts(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CAircraftSituation &situation, const BlackMisc::Aviation::CAircraftParts &parts) override;
|
||||
virtual void injectWeatherGrid(const BlackMisc::Weather::CWeatherGrid &weatherGrid) override;
|
||||
virtual void callbackReceivedRequestedElevation(const BlackMisc::Geo::CElevationPlane &plane, const BlackMisc::Aviation::CCallsign &callsign, bool isWater) override;
|
||||
virtual void setFlightNetworkConnected(bool connected) override;
|
||||
//! @}
|
||||
|
||||
//! \copydoc BlackMisc::Simulation::ISimulationEnvironmentProvider::requestElevation
|
||||
|
||||
@@ -358,6 +358,11 @@ namespace BlackSimPlugin
|
||||
m_dbusInterface->callDBusAsync(QLatin1String("getFrameStats"), callback);
|
||||
}
|
||||
|
||||
void CXSwiftBusServiceProxy::resetFrameTotals()
|
||||
{
|
||||
m_dbusInterface->callDBus(QLatin1String("resetFrameTotals"));
|
||||
}
|
||||
|
||||
double CXSwiftBusServiceProxy::getLatitudeDeg() const
|
||||
{
|
||||
return m_dbusInterface->callDBusRet<double>(QLatin1String("getLatitudeDeg"));
|
||||
@@ -746,5 +751,6 @@ namespace BlackSimPlugin
|
||||
{
|
||||
m_dbusInterface->callDBus(QLatin1String("setSettingsJson"), json);
|
||||
}
|
||||
} // ns
|
||||
}
|
||||
// ns
|
||||
} // ns
|
||||
|
||||
@@ -217,6 +217,9 @@ namespace BlackSimPlugin
|
||||
void getFrameStatsAsync(double *o_averageFps, double *o_simTimeRatio, double *o_trackMilesShort, double *o_minutesLate);
|
||||
//! @}
|
||||
|
||||
//! \copydoc XSwiftBus::CService::resetFrameTotals
|
||||
void resetFrameTotals();
|
||||
|
||||
//! \copydoc XSwiftBus::CService::getLatitudeDeg
|
||||
//! @{
|
||||
double getLatitudeDeg() const;
|
||||
|
||||
Reference in New Issue
Block a user