diff --git a/src/main/java/io/github/dsheirer/identifier/radio/RadioIdentifier.java b/src/main/java/io/github/dsheirer/identifier/radio/RadioIdentifier.java index f3dfb96b..077e10d8 100644 --- a/src/main/java/io/github/dsheirer/identifier/radio/RadioIdentifier.java +++ b/src/main/java/io/github/dsheirer/identifier/radio/RadioIdentifier.java @@ -37,6 +37,6 @@ public abstract class RadioIdentifier extends IntegerIdentifier @Override public boolean isValid() { - return getValue() >= 0; + return getValue() > 0; } } diff --git a/src/main/java/io/github/dsheirer/module/decode/p25/phase1/message/lc/motorola/LCMotorolaTalkComplete.java b/src/main/java/io/github/dsheirer/module/decode/p25/phase1/message/lc/motorola/LCMotorolaTalkComplete.java index b8bae181..002a39de 100644 --- a/src/main/java/io/github/dsheirer/module/decode/p25/phase1/message/lc/motorola/LCMotorolaTalkComplete.java +++ b/src/main/java/io/github/dsheirer/module/decode/p25/phase1/message/lc/motorola/LCMotorolaTalkComplete.java @@ -24,7 +24,7 @@ package io.github.dsheirer.module.decode.p25.phase1.message.lc.motorola; import io.github.dsheirer.bits.BinaryMessage; import io.github.dsheirer.identifier.Identifier; -import io.github.dsheirer.module.decode.p25.identifier.talkgroup.APCO25Talkgroup; +import io.github.dsheirer.module.decode.p25.identifier.radio.APCO25RadioIdentifier; import io.github.dsheirer.module.decode.p25.phase1.message.lc.LinkControlWord; import java.util.ArrayList; @@ -94,7 +94,7 @@ public class LCMotorolaTalkComplete extends LinkControlWord { if(mAddress == null) { - mAddress = APCO25Talkgroup.create(getMessage().getInt(ADDRESS)); + mAddress = APCO25RadioIdentifier.createFrom(getMessage().getInt(ADDRESS)); } return mAddress; diff --git a/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2DecoderState.java b/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2DecoderState.java index 3083373b..658ade5b 100644 --- a/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2DecoderState.java +++ b/src/main/java/io/github/dsheirer/module/decode/p25/phase2/P25P2DecoderState.java @@ -336,11 +336,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie for(Identifier identifier : mac.getIdentifiers()) { - if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) - { - //Add to the identifier collection after filtering through the patch group manager - getIdentifierCollection().update(mPatchGroupManager.update(identifier)); - } + //Add to the identifier collection after filtering through the patch group manager + getIdentifierCollection().update(mPatchGroupManager.update(identifier)); } } else @@ -373,11 +370,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie for(Identifier identifier : mac.getIdentifiers()) { - if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) - { - //Add to the identifier collection after filtering through the patch group manager - getIdentifierCollection().update(mPatchGroupManager.update(identifier)); - } + //Add to the identifier collection after filtering through the patch group manager + getIdentifierCollection().update(mPatchGroupManager.update(identifier)); } } else @@ -410,11 +404,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie for(Identifier identifier : mac.getIdentifiers()) { - if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) - { - //Add to the identifier collection after filtering through the patch group manager - getIdentifierCollection().update(mPatchGroupManager.update(identifier)); - } + //Add to the identifier collection after filtering through the patch group manager + getIdentifierCollection().update(mPatchGroupManager.update(identifier)); } } else @@ -447,11 +438,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie for(Identifier identifier : mac.getIdentifiers()) { - if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) - { - //Add to the identifier collection after filtering through the patch group manager - getIdentifierCollection().update(mPatchGroupManager.update(identifier)); - } + //Add to the identifier collection after filtering through the patch group manager + getIdentifierCollection().update(mPatchGroupManager.update(identifier)); } } else @@ -484,11 +472,8 @@ public class P25P2DecoderState extends TimeslotDecoderState implements Identifie for(Identifier identifier : mac.getIdentifiers()) { - if(!(identifier.getForm() == Form.TALKGROUP && identifier.getRole() == Role.FROM)) - { - //Add to the identifier collection after filtering through the patch group manager - getIdentifierCollection().update(mPatchGroupManager.update(identifier)); - } + //Add to the identifier collection after filtering through the patch group manager + getIdentifierCollection().update(mPatchGroupManager.update(identifier)); } } else