offset should be 0 for LDU1 and 101 for LDU2 for ARC4

pull/1/head
firealarmss 11 months ago
parent f1a57b593b
commit 121402ca2f

@ -1572,7 +1572,7 @@ namespace dvmconsole
PeerSystem handler = fneSystemManager.GetFneSystem(system.Name); PeerSystem handler = fneSystemManager.GetFneSystem(system.Name);
if (!channel.IsEnabled) if (!channel.IsEnabled || channel.Name == PLAYBACKCHNAME)
continue; continue;
if (cpgChannel.Tgid != e.DstId.ToString()) if (cpgChannel.Tgid != e.DstId.ToString())

@ -307,8 +307,11 @@ namespace dvmconsole
private bool ARC4Process(byte[] imbe, P25DUID duid) private bool ARC4Process(byte[] imbe, P25DUID duid)
{ {
int offset = 256; int offset = 256;
if (duid != P25DUID.LDU2)
offset += 101; if (duid == P25DUID.LDU1)
offset = 0;
else if (duid == P25DUID.LDU2)
offset = 101;
offset += (ksPosition * IMBE_BUF_LEN) + 267 + (ksPosition < 8 ? 0 : 2); offset += (ksPosition * IMBE_BUF_LEN) + 267 + (ksPosition < 8 ? 0 : 2);
ksPosition = (ksPosition + 1) % 9; ksPosition = (ksPosition + 1) % 9;

Loading…
Cancel
Save

Powered by TurnKey Linux.