mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Filter other pilots ghost aircraft when flying in shared cockpit mode
When flying in shared cockpit mode, both pilots log into the network. One as pilot to be visible to ATC and other pilots. The other one as observer. For the observing user, the pilots aircraft needs to be filtered. Filter algorithm is using the same schema as vPilot does. ref T427
This commit is contained in:
committed by
Klaus Basan
parent
420fc40fb2
commit
ee8af9f4c6
@@ -157,6 +157,15 @@ namespace BlackMiscTest
|
||||
QVERIFY2(cs1 == cs2, "Callsigns shall be equal");
|
||||
QVERIFY2(cs1 != cs3, "Callsigns shall not be equal");
|
||||
|
||||
CCallsign pilot("DLH123");
|
||||
CCallsign copilot1("DLH123A");
|
||||
CCallsign copilot2("DLH1233");
|
||||
CCallsign copilot3("DLH12");
|
||||
QVERIFY(copilot1.isMaybeCopilotCallsign(pilot));
|
||||
QVERIFY(!pilot.isMaybeCopilotCallsign(pilot));
|
||||
QVERIFY(!copilot2.isMaybeCopilotCallsign(pilot));
|
||||
QVERIFY(!copilot3.isMaybeCopilotCallsign(pilot));
|
||||
|
||||
CCallsignSet set;
|
||||
set.push_back(cs1);
|
||||
QVERIFY2(set.size() == 1, "List shall be 1");
|
||||
|
||||
Reference in New Issue
Block a user