mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 10:45:37 +08:00
refs #514, ATC stations filter by valid frequency
This commit is contained in:
@@ -126,7 +126,11 @@ namespace BlackGui
|
|||||||
// update
|
// update
|
||||||
if (this->m_timestampOnlineStationsChanged > this->m_timestampLastReadOnlineStations)
|
if (this->m_timestampOnlineStationsChanged > this->m_timestampLastReadOnlineStations)
|
||||||
{
|
{
|
||||||
this->ui->tvp_AtcStationsOnline->updateContainerMaybeAsync(this->getIContextNetwork()->getAtcStationsOnline().stationsWithValidVoiceRoom());
|
this->ui->tvp_AtcStationsOnline->updateContainerMaybeAsync(
|
||||||
|
// test: filter by frequency, see if this is better
|
||||||
|
// this->getIContextNetwork()->getAtcStationsOnline().stationsWithValidVoiceRoom()
|
||||||
|
this->getIContextNetwork()->getAtcStationsOnline().stationsWithValidFrequency()
|
||||||
|
);
|
||||||
this->m_timestampLastReadOnlineStations = QDateTime::currentDateTimeUtc();
|
this->m_timestampLastReadOnlineStations = QDateTime::currentDateTimeUtc();
|
||||||
this->m_timestampOnlineStationsChanged = this->m_timestampLastReadOnlineStations;
|
this->m_timestampOnlineStationsChanged = this->m_timestampLastReadOnlineStations;
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,11 @@ namespace BlackMisc
|
|||||||
return this->findBy(&CAtcStation::hasValidVoiceRoom, true);
|
return this->findBy(&CAtcStation::hasValidVoiceRoom, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CAtcStationList CAtcStationList::stationsWithValidFrequency() const
|
||||||
|
{
|
||||||
|
return this->findBy(&CAtcStation::hasValidFrequency, true);
|
||||||
|
}
|
||||||
|
|
||||||
CUserList CAtcStationList::getControllers() const
|
CUserList CAtcStationList::getControllers() const
|
||||||
{
|
{
|
||||||
return this->findBy(Predicates::MemberValid(&CAtcStation::getController)).transform(Predicates::MemberTransform(&CAtcStation::getController));
|
return this->findBy(Predicates::MemberValid(&CAtcStation::getController)).transform(Predicates::MemberTransform(&CAtcStation::getController));
|
||||||
|
|||||||
@@ -47,9 +47,13 @@ namespace BlackMisc
|
|||||||
CAtcStationList findIfComUnitTunedIn25KHz(const BlackMisc::Aviation::CComSystem &comUnit) const;
|
CAtcStationList findIfComUnitTunedIn25KHz(const BlackMisc::Aviation::CComSystem &comUnit) const;
|
||||||
|
|
||||||
//! Find 0..n stations with valid voice room
|
//! Find 0..n stations with valid voice room
|
||||||
//! \sa CAtcStation::hasValid
|
//! \sa CAtcStation::hasValidVoiceRoom
|
||||||
CAtcStationList stationsWithValidVoiceRoom() const;
|
CAtcStationList stationsWithValidVoiceRoom() const;
|
||||||
|
|
||||||
|
//! Find 0..n stations with valid COM frequency
|
||||||
|
//! \sa CAtcStation::hasValidFrequency
|
||||||
|
CAtcStationList stationsWithValidFrequency() const;
|
||||||
|
|
||||||
//! All controllers (with valid data)
|
//! All controllers (with valid data)
|
||||||
BlackMisc::Network::CUserList getControllers() const;
|
BlackMisc::Network::CUserList getControllers() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user