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);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace BlackCore
|
||||
using namespace BlackMisc::Aviation;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
void exceptionDispatcher(const char* caller);
|
||||
void exceptionDispatcher(const char *caller);
|
||||
|
||||
CNetworkVatlib::CNetworkVatlib(CNetworkVatlib::LoginMode loginMode, QObject *parent)
|
||||
: INetwork(parent),
|
||||
@@ -310,7 +310,7 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
void CNetworkVatlib::setOwnAircraftAvionics(const BlackMisc::Aviation::CComSystem &com1, const BlackMisc::Aviation::CComSystem &com2,
|
||||
const BlackMisc::Aviation::CTransponder &xpdr)
|
||||
const BlackMisc::Aviation::CTransponder &xpdr)
|
||||
{
|
||||
m_ownAircraft.setCom1System(com1);
|
||||
m_ownAircraft.setCom1System(com2);
|
||||
@@ -411,7 +411,7 @@ namespace BlackCore
|
||||
try
|
||||
{
|
||||
m_net->ReplyToInfoQuery(Cvatlib_Network::infoQuery_Freq, toFSD(callsign),
|
||||
toFSD(QString::number(m_ownAircraft.getCom1System().getFrequencyActive().value(CFrequencyUnit::MHz()), 'f', 3)));
|
||||
toFSD(QString::number(m_ownAircraft.getCom1System().getFrequencyActive().value(CFrequencyUnit::MHz()), 'f', 3)));
|
||||
}
|
||||
catch (...) { exceptionDispatcher(Q_FUNC_INFO); }
|
||||
}
|
||||
@@ -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