Disable high priority search

This prevents channel searches from taking precedence over
established connections.

When the timeslots for searching and established channels
overlap, the search will blocked for that period instead
of the established channel.

This prevents data loss on the established channels at the
expense of potentially longer search time (only in the case
of channel collisions).
This commit is contained in:
Jon Escombe
2016-01-06 19:01:46 +00:00
parent 1a1934bf21
commit 2794bf5c2f

View File

@@ -905,7 +905,7 @@ void ANTChannel::channelId(unsigned char *ant_message) {
// if we were searching,
if (channel_type_flags&CHANNEL_TYPE_QUICK_SEARCH) {
//qDebug()<<number<<"change timeout setting";
parent->sendMessage(ANTMessage::setHPSearchTimeout(number, (int)(timeout_lost/2.5)));
parent->sendMessage(ANTMessage::setLPSearchTimeout(number, (int)(timeout_lost/2.5)));
}
channel_type_flags &= ~CHANNEL_TYPE_QUICK_SEARCH;
}
@@ -1014,10 +1014,14 @@ void ANTChannel::attemptTransition(int message_id)
case ANT_CHANNEL_ID:
//qDebug()<<number<<"TRANSITION from channel id";
//qDebug()<<number<<"**** adjust timeout";
// Disable high priority searching - for better coexistence with other channels
parent->sendMessage(ANTMessage::setHPSearchTimeout(number, 0));
if (channel_type_flags & CHANNEL_TYPE_QUICK_SEARCH) {
parent->sendMessage(ANTMessage::setHPSearchTimeout(number, (int)(timeout_scan/2.5)));
parent->sendMessage(ANTMessage::setLPSearchTimeout(number, (int)(timeout_scan/2.5)));
} else {
parent->sendMessage(ANTMessage::setHPSearchTimeout(number, (int)(timeout_lost/2.5)));
parent->sendMessage(ANTMessage::setLPSearchTimeout(number, (int)(timeout_lost/2.5)));
}
break;