mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Fixed ATIS bug, ATIS was applyIf as IndexAtisMessage (correct IndexAtis).
Also fixed appending CR.
This commit is contained in:
@@ -251,8 +251,6 @@ namespace BlackCore
|
||||
|
||||
/*!
|
||||
* \brief ATIS received
|
||||
* \param callsign
|
||||
* \param atisMessage
|
||||
*/
|
||||
void psFsdAtisQueryReceived(const BlackMisc::Aviation::CCallsign &callsign, const BlackMisc::Aviation::CInformationMessage &atisMessage);
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace BlackCore
|
||||
{
|
||||
// this->log(Q_FUNC_INFO, callsign.toQString(), atisMessage);
|
||||
|
||||
CValueMap vm(CAtcStation::IndexAtisMessage, atisMessage.toQVariant());
|
||||
CValueMap vm(CAtcStation::IndexAtis, atisMessage.toQVariant());
|
||||
this->m_atcStationsOnline.applyIf(&CAtcStation::getCallsign, callsign, vm);
|
||||
this->m_atcStationsBooked.applyIf(&CAtcStation::getCallsign, callsign, vm);
|
||||
}
|
||||
|
||||
@@ -658,7 +658,7 @@ namespace BlackCore
|
||||
|
||||
void CNetworkVatlib::onAtisReplyReceived(Cvatlib_Network *, const char *callsign, Cvatlib_Network::atisLineType lineType, const char *data, void *cbvar)
|
||||
{
|
||||
auto &atis = cbvar_cast(cbvar)->m_atisParts[cbvar_cast(cbvar)->fromFSD(callsign)];
|
||||
auto &atis = cbvar_cast(cbvar)->m_atisParts[cbvar_cast(cbvar)->fromFSD(callsign)]; // also inserts in map if not already in
|
||||
|
||||
if (lineType == Cvatlib_Network::atisLineType_VoiceRoom)
|
||||
{
|
||||
@@ -687,7 +687,9 @@ namespace BlackCore
|
||||
if (test.startsWith("z") && test.length() == 2) return; // z1, z2, ..
|
||||
if (test.length() == 1) return; // sometimes just z
|
||||
|
||||
atis.appendMessage("\n" + cbvar_cast(cbvar)->fromFSD(data));
|
||||
// append
|
||||
if (!atis.isEmpty()) atis.appendMessage("\n");
|
||||
atis.appendMessage(fixed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user