Skip to content

Commit 68b8ba0

Browse files
authored
The UAB in the UDT is one less than reality.
1 parent 4378a2b commit 68b8ba0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

DMRDataHeader.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (C) 2012 by Ian Wraith
3-
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
2+
* Copyright (C) 2012 by Ian Wraith
3+
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
44
*
55
* This program is free software; you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -118,14 +118,15 @@ bool CDMRDataHeader::put(const unsigned char* bytes)
118118

119119
case DPF_UDT:
120120
CUtils::dump(1U, "DMR, Unified Data Transport Header", m_data, 12U);
121-
m_blocks = m_data[8U] & 0x03U;
121+
m_blocks = (m_data[8U] & 0x03U) + 1U;
122122
break;
123123

124124
default:
125125
CUtils::dump("DMR, Unknown Data Header", m_data, 12U);
126126
break;
127127
}
128128

129+
// This may not be needed any longer
129130
if (dpf == DPF_UDT && m_blocks == 0U) {
130131
unsigned char format = m_data[1U] & 0x0FU;
131132
if (format == UDTF_NMEA) {

0 commit comments

Comments
 (0)