Ref T786, simulator context

* use identifier based "requestWeatherGrid"
* injectWeatherGrid now public
* clean m_lastWeatherPosition if weather is de-activated
* inject weather CContextSimulator::onWeatherGridReceived

1) this automatically injects the weather, the callback is not needed
2) the callback was the part which crashed
This commit is contained in:
Klaus Basan
2020-04-19 02:34:15 +02:00
committed by Mat Sutcliffe
parent e7875c3af8
commit 58583d3ffa
8 changed files with 69 additions and 51 deletions

View File

@@ -270,6 +270,9 @@ namespace BlackCore
//! \remark public for testing purposes
virtual void callbackReceivedRequestedElevation(const BlackMisc::Geo::CElevationPlane &plane, const BlackMisc::Aviation::CCallsign &callsign, bool isWater);
//! Inject weather grid to simulator
virtual void injectWeatherGrid(const BlackMisc::Weather::CWeatherGrid &weatherGrid);
//! Allows to print out simulator specific statistics
virtual QString getStatisticsSimulatorSpecific() const { return QString(); }
@@ -524,9 +527,6 @@ namespace BlackCore
//! Kill timer if id is valid
void safeKillTimer();
//! Inject weather grid to simulator
virtual void injectWeatherGrid(const BlackMisc::Weather::CWeatherGrid &weatherGrid);
//! Blink the highlighted aircraft
void blinkHighlightedAircraft();