[AFV] Disregard 6th digit of VHF alias frequency

This means for example 132.070 is equal to 132.075
This commit is contained in:
Mat Sutcliffe
2021-10-07 19:21:11 +01:00
parent e67c2013e0
commit 6cd4c38b68

View File

@@ -1287,6 +1287,11 @@ namespace BlackCore
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;
});