mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
[AFV], Ref T730 play audio "tuned in"/"out"
Replaces the former voice room connected sounds
This commit is contained in:
@@ -47,6 +47,14 @@ namespace BlackMisc
|
||||
});
|
||||
}
|
||||
|
||||
bool CAtcStationList::hasComUnitTunedInChannelSpacing(const CComSystem &comUnit) const
|
||||
{
|
||||
return this->containsBy([&](const CAtcStation & atcStation)
|
||||
{
|
||||
return atcStation.isComUnitTunedInChannelSpacing(comUnit);
|
||||
});
|
||||
}
|
||||
|
||||
CAtcStationList CAtcStationList::findIfFrequencyIsWithinSpacing(const CFrequency &frequency, CComSystem::ChannelSpacing spacing)
|
||||
{
|
||||
if (frequency.isNull()) { return CAtcStationList(); }
|
||||
@@ -110,6 +118,14 @@ namespace BlackMisc
|
||||
return this->removeIf(&CAtcStation::isInRange, false);
|
||||
}
|
||||
|
||||
CAtcStationList CAtcStationList::findInRange() const
|
||||
{
|
||||
if (this->isEmpty()) { return {}; }
|
||||
CAtcStationList copy(*this);
|
||||
copy.removeIfOutsideRange();
|
||||
return copy;
|
||||
}
|
||||
|
||||
int CAtcStationList::synchronizeWithBookedStation(CAtcStation &bookedAtcStation)
|
||||
{
|
||||
int c = 0;
|
||||
|
||||
@@ -46,12 +46,15 @@ namespace BlackMisc
|
||||
//! Construct from a base class object.
|
||||
CAtcStationList(const CSequence<CAtcStation> &other);
|
||||
|
||||
//! Find 0..n stations tune in frequency of COM unit (with 25kHz channel spacing)
|
||||
//! Find 0..n stations tuned in frequency of COM unit (with 25kHz channel spacing)
|
||||
CAtcStationList findIfComUnitTunedIn25KHz(const CComSystem &comUnit) const;
|
||||
|
||||
//! Find 0..n stations tune in frequency of COM unit (with channel spacing)
|
||||
//! Find 0..n stations tuned in frequency of COM unit (with channel spacing)
|
||||
CAtcStationList findIfComUnitTunedInChannelSpacing(const CComSystem &comUnit) const;
|
||||
|
||||
//! Any stations tuned in frequency of COM unit (with channel spacing)
|
||||
bool hasComUnitTunedInChannelSpacing(const CComSystem &comUnit) const;
|
||||
|
||||
//! Find 0..n stations within channel spacing
|
||||
CAtcStationList findIfFrequencyIsWithinSpacing(const PhysicalQuantities::CFrequency &frequency, CComSystem::ChannelSpacing spacing);
|
||||
|
||||
@@ -71,6 +74,9 @@ namespace BlackMisc
|
||||
//! Remove if marked outside of range
|
||||
int removeIfOutsideRange();
|
||||
|
||||
//! Those in range
|
||||
CAtcStationList findInRange() const;
|
||||
|
||||
//! Synchronize with ATC station representing booking information.
|
||||
//! Both sides (booking, online station) will be updated.
|
||||
//! \pre Can be used only if the stored data in this list are online ATC stations
|
||||
|
||||
Reference in New Issue
Block a user