mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Ref T261, a global altitude offset can be enabled for testing
This commit is contained in:
committed by
Roland Winklmeier
parent
a2ab62a25a
commit
2d66fd470a
@@ -480,10 +480,17 @@ namespace BlackMisc
|
||||
|
||||
bool CRemoteAircraftProvider::testAddAltitudeOffsetToSituation(CAircraftSituation &situation) const
|
||||
{
|
||||
if (!this->hasTestAltitudeOffset(situation.getCallsign())) { return false; }
|
||||
const CCallsign cs(situation.getCallsign());
|
||||
// for global offset testing set "true"
|
||||
constexpr bool globalOffsetTest = false;
|
||||
|
||||
const CCallsign cs(situation.getCallsign());
|
||||
if (!globalOffsetTest && !this->hasTestAltitudeOffset(cs)) { return false; }
|
||||
CLength os;
|
||||
if (globalOffsetTest)
|
||||
{
|
||||
os = CLength(100, CLengthUnit::ft());
|
||||
}
|
||||
else
|
||||
{
|
||||
QReadLocker l(&m_lockSituations);
|
||||
os = m_testOffset.value(cs);
|
||||
|
||||
Reference in New Issue
Block a user