Skip to content

Commit 0837e5f

Browse files
committed
vfx: update ROTATING mode
1 parent 90ee037 commit 0837e5f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

main/src/user/vfx.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,13 +1249,13 @@ static void vfx_task(void *pvParameter)
12491249
for (uint8_t i=0; i<8; i++) {
12501250
vfx_draw_layer_bitmap(i, vfx_bitmap_line[frame_idx], vfx.lightness);
12511251

1252-
if (++frame_idx == 28) {
1253-
frame_idx = 0;
1252+
if (frame_idx-- == 0) {
1253+
frame_idx = 27;
12541254
}
12551255
}
12561256

1257-
if (++frame_pre == 28) {
1258-
frame_idx = 0;
1257+
if (frame_pre-- == 0) {
1258+
frame_idx = 27;
12591259
} else {
12601260
frame_idx = frame_pre;
12611261
}
@@ -1284,13 +1284,13 @@ static void vfx_task(void *pvParameter)
12841284
for (uint8_t i=0; i<8; i++) {
12851285
vfx_draw_layer_bitmap(i, vfx_bitmap_line[frame_idx], vfx.lightness);
12861286

1287-
if (frame_idx-- == 0) {
1288-
frame_idx = 27;
1287+
if (++frame_idx == 28) {
1288+
frame_idx = 0;
12891289
}
12901290
}
12911291

1292-
if (frame_pre-- == 0) {
1293-
frame_idx = 27;
1292+
if (++frame_pre == 28) {
1293+
frame_idx = 0;
12941294
} else {
12951295
frame_idx = frame_pre;
12961296
}

0 commit comments

Comments
 (0)