Skip to content

Commit

Permalink
Reduce another int to uint8_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Aug 30, 2013
1 parent a570bd9 commit 9bf17ae
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/Charliplexing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,12 @@ void LedSign::Set(uint8_t x, uint8_t y, uint8_t c)
c = SHADES-1;
#endif

uint16_t mask = 1 << pgm_read_byte_near(&ledMap[x+y*DISPLAY_COLS].high);
uint8_t cycle = pgm_read_byte_near(&ledMap[x+y*DISPLAY_COLS].cycle);
const LEDPosition *map = &ledMap[x+y*DISPLAY_COLS];
uint16_t mask = 1 << pgm_read_byte_near(&map->high);
uint8_t cycle = pgm_read_byte_near(&map->cycle);

uint16_t *p = &workBuffer->pixels[cycle*(SHADES-1)];
int i;
uint8_t i;
for (i = 0; i < c; i++)
*p++ |= mask; // ON;
for (; i < SHADES-1; i++)
Expand Down

0 comments on commit 9bf17ae

Please sign in to comment.