1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2026-08-13 23:13:49 -04:00

vorlocalizer: Fix round robin plan sorting comparator

The channel count comparison in getChannelsByDevice() accidentally used
the first plan's channel count for both operands. This caused the comparator
to always treat the channel counts as equal and sort only by bandwidth.

Use the second plan's channel count when comparing RRTurnPlans so plans are
ordered correctly by number of channels before applying the bandwidth
tie-breaker.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
Robin Getz
2026-08-01 19:16:31 -04:00
parent c9c95398f3
commit bef0b8184e
@@ -652,7 +652,7 @@ void VorLocalizerWorker::getChannelsByDevice(
bool operator()(const RRTurnPlan& a, const RRTurnPlan& b)
{
unsigned int nbChannelsA = a.m_channels.size();
unsigned int nbChannelsB = a.m_channels.size();
unsigned int nbChannelsB = b.m_channels.size();
if (nbChannelsA == nbChannelsB) {
return a.m_bandwidth > b.m_bandwidth;