Spiral size fix.
This commit is contained in:
@@ -335,18 +335,18 @@ void handle_current_state()
|
|||||||
}
|
}
|
||||||
case ST_SPIRAL: // state spiral
|
case ST_SPIRAL: // state spiral
|
||||||
{
|
{
|
||||||
int res = draw_spiral(false, spiral_direction, MATRIX_WIDTH - 1);
|
int res = draw_spiral(false, spiral_direction, MATRIX_WIDTH - 2);
|
||||||
if (res && spiral_direction == 0)
|
if ((bool)res && spiral_direction == 0)
|
||||||
{
|
{
|
||||||
// change spiral direction to closing (draw empty leds)
|
// change spiral direction to closing (draw empty leds)
|
||||||
spiral_direction = 1;
|
spiral_direction = true;
|
||||||
// init spiral with new spiral direction
|
// init spiral with new spiral direction
|
||||||
draw_spiral(true, spiral_direction, MATRIX_WIDTH - 1);
|
draw_spiral(true, spiral_direction, MATRIX_WIDTH - 1);
|
||||||
}
|
}
|
||||||
else if (res && spiral_direction == 1)
|
else if (res && spiral_direction == 1)
|
||||||
{
|
{
|
||||||
// reset spiral direction to normal drawing leds
|
// reset spiral direction to normal drawing leds
|
||||||
spiral_direction = 0;
|
spiral_direction = false;
|
||||||
// init spiral with new spiral direction
|
// init spiral with new spiral direction
|
||||||
draw_spiral(true, spiral_direction, MATRIX_WIDTH - 1);
|
draw_spiral(true, spiral_direction, MATRIX_WIDTH - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user