Skip to content

Commit

Permalink
The UAB in the UDT is one less than reality.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx authored May 15, 2017
1 parent 4378a2b commit 68b8ba0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions DMRDataHeader.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2012 by Ian Wraith
* Copyright (C) 2015,2016 by Jonathan Naylor G4KLX
* Copyright (C) 2012 by Ian Wraith
* Copyright (C) 2015,2016,2017 by Jonathan Naylor G4KLX
*
* 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 @@ -118,14 +118,15 @@ bool CDMRDataHeader::put(const unsigned char* bytes)

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

default:
CUtils::dump("DMR, Unknown Data Header", m_data, 12U);
break;
}

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

0 comments on commit 68b8ba0

Please sign in to comment.