Spiral size fix.

This commit is contained in:
2023-11-03 01:21:05 +01:00
parent c35a8501a7
commit 13104d84e8

View File

@@ -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);
} }