Skip to content

Commit

Permalink
Fix bug in jt65_interleave
Browse files Browse the repository at this point in the history
  • Loading branch information
NT7S committed Jan 24, 2016
1 parent ddda8b3 commit 89fdbea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Etherkit JTEncode
version=1.0.0
version=1.0.1
author=Jason Milldrum <[email protected]>
maintainer=Jason Milldrum <[email protected]>
sentence=Generate JT65, JT9, JT4, and WSPR symbols on your Arduino.
Expand Down
14 changes: 2 additions & 12 deletions src/JTEncode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -512,23 +512,13 @@ void JTEncode::jt65_interleave(uint8_t * s)
{
uint8_t i, j;
uint8_t d[JT65_ENCODE_COUNT];
uint8_t d1[7][9];

// Fill temp d1 array
// Interleave
for(i = 0; i < 9; i++)
{
for(j = 0; j < 7; j++)
{
d1[i][j] = s[(i * 7) + j];
}
}

// Interleave and translate back to 1D destination array
for(i = 0; i < 7; i++)
{
for(j = 0; j < 9; j++)
{
d[(i * 9) + j] = d1[j][i];
d[(j * 9) + i] = s[(i * 7) + j];
}
}

Expand Down

0 comments on commit 89fdbea

Please sign in to comment.