mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
[AFV] Disregard 6th digit of VHF alias frequency
This means for example 132.070 is equal to 132.075
This commit is contained in:
@@ -1338,6 +1338,11 @@ namespace BlackCore::Afv::Clients
|
||||
QMutexLocker lock(&m_mutex);
|
||||
const auto it = std::find_if(m_aliasedStations.constBegin(), m_aliasedStations.constEnd(), [roundedFrequencyHz](const StationDto & d)
|
||||
{
|
||||
if (d.frequencyAliasHz > 100000000 && roundedFrequencyHz > 100000000) // both VHF
|
||||
{
|
||||
// disregard 6th digit (e.g. 132.070 == 132.075)
|
||||
return (d.frequencyAliasHz / 10000 * 10000) == (roundedFrequencyHz / 10000 * 10000);
|
||||
}
|
||||
return d.frequencyAliasHz == roundedFrequencyHz;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user