mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T436, allow to set a global offset altitude for testing (example: ".altos ? -10m")
This commit is contained in:
@@ -364,11 +364,20 @@ namespace BlackCore
|
||||
if (!m_airspace) { return false; }
|
||||
if (parser.countParts() < 2) { return false; }
|
||||
|
||||
const CCallsign cs(parser.part(1));
|
||||
if (!m_airspace->isAircraftInRange(cs))
|
||||
const QString csPart(parser.part(1));
|
||||
CCallsign cs;
|
||||
if (csPart.contains('?'))
|
||||
{
|
||||
CLogMessage(this).validationError("Altitude offset unknown callsign");
|
||||
return false;
|
||||
cs = IRemoteAircraftProvider::testAltitudeOffsetCallsign(); // wildcard
|
||||
}
|
||||
else
|
||||
{
|
||||
cs = CCallsign(csPart);
|
||||
if (!m_airspace->isAircraftInRange(cs))
|
||||
{
|
||||
CLogMessage(this).validationError("Altitude offset unknown callsign");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
CLength os(CLength::null());
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace BlackCore
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".m", "alias: .msg"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".m message text", "send text message"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".m callsign message text", "send text message"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".altos callsign offsetvalue", "set altitude offset value (testing)"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".altos callsign|? offsetvalue", "set altitude offset value (testing)"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".watchdog on|off", "enable/disable network watchdog (testing)"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".wallop message", "send a wallop message"});
|
||||
BlackMisc::CSimpleCommandParser::registerCommand({".reinit", "re-initialize all aircraft"});
|
||||
|
||||
Reference in New Issue
Block a user