From 23b46213973b45e929e1a884eea245345852f744 Mon Sep 17 00:00:00 2001 From: Boromatic Date: Sat, 30 Jan 2016 18:26:56 +0000 Subject: [PATCH] debugged encodeErrorCheck() First you have to encode the raws. Otherwise the hamming-code for the last 4 columns (column-hamming of raw-hamming) could not computed. --- BPTC19696.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/BPTC19696.cpp b/BPTC19696.cpp index 6f42b34..f4368fb 100644 --- a/BPTC19696.cpp +++ b/BPTC19696.cpp @@ -268,6 +268,13 @@ void CBPTC19696::encodeExtractData(const unsigned char* in) const // Check each row with a Hamming (15,11,3) code and each column with a Hamming (13,9,3) code void CBPTC19696::encodeErrorCheck() { + + // Run through each of the 9 rows containing data + for (unsigned int r = 0U; r < 9U; r++) { + unsigned int pos = (r * 15U) + 1U; + CHamming::encode15113(m_deInterData + pos); + } + // Run through each of the 15 columns bool col[13U]; for (unsigned int c = 0U; c < 15U; c++) { @@ -285,12 +292,6 @@ void CBPTC19696::encodeErrorCheck() pos = pos + 15U; } } - - // Run through each of the 9 rows containing data - for (unsigned int r = 0U; r < 9U; r++) { - unsigned int pos = (r * 15U) + 1U; - CHamming::encode15113(m_deInterData + pos); - } } // Interleave the raw data