Light up right side only in test

This commit is contained in:
Luke
2020-06-03 20:37:42 +12:00
parent fe0f8568bc
commit 0530786ee5
2 changed files with 4 additions and 12 deletions

View File

@@ -20,17 +20,9 @@ fn main() {
// Try an outline, top and right
let mut matrix = AniMeMatrix::new();
{
let mut tmp = matrix.get_mut();
let mut first_row_done = false;
let tmp = matrix.get_mut();
for row in tmp.iter_mut() {
if !first_row_done {
for c in row.iter_mut() {
*c = 0xff;
}
first_row_done = true;
} else {
row[row.len() - 1] = 0xff;
}
row[row.len() - 1] = 0xff;
}
}

View File

@@ -44,7 +44,7 @@ impl From<AniMeMatrix> for AniMePacketType {
let mut total = 0;
for (count, row) in anime.0.iter().enumerate() {
// Write the top block of LEDs (first 7 rows)
if count <= 7 {
if count <= 6 {
for x in row.iter() {
write_block[write_index] = *x;
write_index += 1;
@@ -63,7 +63,7 @@ impl From<AniMeMatrix> for AniMePacketType {
}
let index = row.len() - phys_row_len;
for n in index..row.len() - 1 {
for n in index..row.len() {
// Require a special case to catch the correct end-of-packet which is
// 6 bytes from the end
if write_index == BLOCK_END && !block1_done {