Permalink
Browse files

fix bright rows 7 and 15. adjust brightness scaling

  • Loading branch information...
1 parent 8a36317 commit c67741fde56b27b3bfcc763693ee59212aab0e9d @osresearch committed Jan 1, 2000
Showing with 12 additions and 8 deletions.
  1. +9 −3 matrix-test.c
  2. +3 −5 matrix.p
View
@@ -134,7 +134,11 @@ gradient(
for (unsigned x=0; x < width; x++) {
for (unsigned y=0; y < height; y++) {
uint8_t * const out = &pixels[x + y*width];
- out[2] = 0x80 * (1 & (((x+cycle) >> 2) ^ ((y+cycle) >> 2)));
+ //out[0] = ((x+cycle) % 32) * 8;
+ //out[1] = ((y+cycle) % 16) * 16;
+ out[0] = ((x+y+cycle) % 32) * 8;
+ out[1] = ((x+y+cycle) % 32) * 8;
+ out[2] = ((x+y+cycle) % 32) * 8;
}
}
}
@@ -163,8 +167,10 @@ main(void)
while (1)
{
- rainbow(p, width, height, 10, i++);
- //gradient(p, width, height, 10, i++);
+ if (1)
+ rainbow(p, width, height, 10, i++);
+ else
+ gradient(p, width, height, 10, i++);
ledscape_draw(leds, p);
usleep(20000);
View
@@ -420,7 +420,7 @@ PWM_LOOP:
// every fourth, every eigth, etc pixel based on
// the current brightness.
#if 1
- LSR out_set, offset, 2
+ LSR out_set, offset, 1
QBLT no_blank, bright, out_set
DISPLAY_OFF
@@ -434,9 +434,7 @@ PWM_LOOP:
// Unless we've just done a full image, in which case
// we treat this as a dummy row and go back to the top
DISPLAY_OFF
-#ifdef fix_dim
- QBEQ NEXT_ROW, row, 8
-#endif
+ QBEQ LAST_ROW, row, 8
LATCH_HI
// set address; select pins in gpio1 are sequential
@@ -454,7 +452,7 @@ PWM_LOOP:
DISPLAY_ON
ADD row, row, 1
- QBEQ LAST_ROW, row, 8
+ //QBEQ LAST_ROW, row, 8
// Before going to the next row, increment our data_offset
// to the next row and reset our offset

0 comments on commit c67741f

Please sign in to comment.