Skip to content

Commit

Permalink
#1841 DMR call events include channel and frequency (#1842)
Browse files Browse the repository at this point in the history
Co-authored-by: Dennis Sheirer <dsheirer@github.com>
  • Loading branch information
DSheirer and Dennis Sheirer committed Feb 10, 2024
1 parent 8a5b31f commit 1df29b6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import io.github.dsheirer.log.LoggingSuppressor;
import io.github.dsheirer.message.IMessage;
import io.github.dsheirer.module.decode.DecoderType;
import io.github.dsheirer.module.decode.dmr.channel.DMRAbsoluteChannel;
import io.github.dsheirer.module.decode.dmr.channel.DMRChannel;
import io.github.dsheirer.module.decode.dmr.channel.DMRLsn;
import io.github.dsheirer.module.decode.dmr.event.DMRDecodeEvent;
Expand Down Expand Up @@ -645,6 +646,10 @@ private void processData(DataMessage message)
closeCurrentCallEvent(message.getTimestamp());
getIdentifierCollection().remove(IdentifierClass.USER);
broadcast(new DecoderStateEvent(this, Event.CONTINUATION, State.ACTIVE, getTimeslot()));
if(mNetworkConfigurationMonitor != null)
{
mNetworkConfigurationMonitor.process(message);
}
break;
case TLC:
if(message instanceof Terminator)
Expand Down Expand Up @@ -1394,6 +1399,12 @@ private void updateCurrentCall(DecodeEventType type, String details, long timest
{
Event event = (mCurrentCallEvent == null ? Event.START : Event.CONTINUATION);

//Create a repeater channel descriptor if we don't have one
if(mCurrentChannel == null && mCurrentFrequency > 0)
{
mCurrentChannel = new DMRAbsoluteChannel(getTimeslot(), getTimeslot(), mCurrentFrequency, 0);
}

if(mCurrentCallEvent == null)
{
mCurrentCallEvent = DMRDecodeEvent.builder(type, timestamp)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2023 Dennis Sheirer
* Copyright (C) 2014-2024 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
Expand Down Expand Up @@ -69,7 +69,6 @@ public String toString()
StringBuilder sb = new StringBuilder();

sb.append(getValue());
sb.append(" TS:").append(getTimeslot());
sb.append(" ").append(getDownlinkFrequency() / 1E6d);

return sb.toString();
Expand Down

0 comments on commit 1df29b6

Please sign in to comment.