WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit a8b32e9

Browse files
authored
animation: add Bluetooth animation in download mode (#17)
1 parent c95faf3 commit a8b32e9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ static uint16_t common_tasks(tmosTaskID task_id, uint16_t events)
189189
return events ^ ANI_FLASH;
190190
}
191191

192+
if (events & BLE_NEXT_STEP) {
193+
ani_xbm_next_frame(&bluetooth, fb, 10, 0);
194+
195+
return events ^ BLE_NEXT_STEP;
196+
}
197+
192198
return 0;
193199
}
194200

@@ -256,6 +262,9 @@ void ble_start()
256262
tmos_stop_task(common_taskid, ANI_NEXT_STEP);
257263
tmos_stop_task(common_taskid, ANI_MARQUE);
258264
tmos_stop_task(common_taskid, ANI_FLASH);
265+
memset(fb, 0, sizeof(fb));
266+
267+
tmos_start_reload_task(common_taskid, BLE_NEXT_STEP, 500000 / 625);
259268
}
260269

261270
void handle_mode_transition()

0 commit comments

Comments
 (0)