Resolves issue with the multi-frequency tuner source and P25/MPT1327 (#603)

Resolves issue with the multi-frequency tuner source and P25/MPT1327 (#603) rotating channel frequency configurations failing to maintain lock
on the channel.

Converted the ChannelRotationMonitor from using identifier updates to
now using DecoderStateEvents so that the ChannelState can supply a
steady stream of channel state events to the monitor.
This commit is contained in:
Denny Sheirer
2019-11-23 10:19:23 -05:00
committed by GitHub
parent d3c1a605df
commit 00d5610213
4 changed files with 125 additions and 38 deletions

View File

@@ -132,6 +132,16 @@ public class MultiChannelState extends AbstractChannelState implements IDecoderS
@Override
public void stateChanged(State state, int timeslot)
{
//Broadcast current channel state so that channel rotation monitor can track
if(state.isActiveState())
{
broadcast(DecoderStateEvent.activeState(timeslot));
}
else
{
broadcast(DecoderStateEvent.inactiveState(timeslot));
}
ChannelStateIdentifier stateIdentifier = ChannelStateIdentifier.create(state);
mIdentifierCollectionMap.get(timeslot).update(stateIdentifier);
mChannelMetadataMap.get(timeslot).receive(new IdentifierUpdateNotification(stateIdentifier, IdentifierUpdateNotification.Operation.ADD, timeslot));