From 35b0b5ef9bc44954173ed5cc33ec056ae6831512 Mon Sep 17 00:00:00 2001 From: Denny Sheirer Date: Sat, 21 Dec 2019 07:08:05 -0500 Subject: [PATCH] Resolves #623 issue with P25 channels where uplink/downlink use different frequency bands. (#624) --- .../p25/identifier/channel/P25Channel.java | 6 ++-- .../channel/P25ExplicitChannel.java | 32 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/src/main/java/io/github/dsheirer/module/decode/p25/identifier/channel/P25Channel.java b/src/main/java/io/github/dsheirer/module/decode/p25/identifier/channel/P25Channel.java index 8bee3c1a..53698c0d 100644 --- a/src/main/java/io/github/dsheirer/module/decode/p25/identifier/channel/P25Channel.java +++ b/src/main/java/io/github/dsheirer/module/decode/p25/identifier/channel/P25Channel.java @@ -122,7 +122,10 @@ public class P25Channel implements IChannelDescriptor @Override public void setFrequencyBand(IFrequencyBand frequencyBand) { - mFrequencyBand = frequencyBand; + if(frequencyBand.getIdentifier() == getDownlinkBandIdentifier()) + { + mFrequencyBand = frequencyBand; + } } @Override @@ -206,7 +209,6 @@ public class P25Channel implements IChannelDescriptor .append("-") .append(getDownlinkLogicalChannelNumber()) .append("/-----"); - return getDownlinkBandIdentifier() + "-" + (getDownlinkLogicalChannelNumber()) + "/-----"; } if(isTDMAChannel()) diff --git a/src/main/java/io/github/dsheirer/module/decode/p25/identifier/channel/P25ExplicitChannel.java b/src/main/java/io/github/dsheirer/module/decode/p25/identifier/channel/P25ExplicitChannel.java index 87f8f003..1c28cb3b 100644 --- a/src/main/java/io/github/dsheirer/module/decode/p25/identifier/channel/P25ExplicitChannel.java +++ b/src/main/java/io/github/dsheirer/module/decode/p25/identifier/channel/P25ExplicitChannel.java @@ -1,21 +1,23 @@ /* - * ****************************************************************************** - * sdrtrunk - * Copyright (C) 2014-2019 Dennis Sheirer * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. + * * ****************************************************************************** + * * Copyright (C) 2014-2019 Dennis Sheirer + * * + * * This program is free software: you can redistribute it and/or modify + * * it under the terms of the GNU General Public License as published by + * * the Free Software Foundation, either version 3 of the License, or + * * (at your option) any later version. + * * + * * This program is distributed in the hope that it will be useful, + * * but WITHOUT ANY WARRANTY; without even the implied warranty of + * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * * GNU General Public License for more details. + * * + * * You should have received a copy of the GNU General Public License + * * along with this program. If not, see + * * ***************************************************************************** * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * ***************************************************************************** */ package io.github.dsheirer.module.decode.p25.identifier.channel; @@ -36,11 +38,13 @@ public class P25ExplicitChannel extends P25Channel implements Comparable