add bongocat fix courtesy of fossephate and petejohanson

This commit is contained in:
Justus 2022-01-16 20:35:20 +08:00
parent a05b39b4f8
commit 6ccd5455c1
2 changed files with 9 additions and 9 deletions

View file

@ -63,7 +63,7 @@ void update_bongo_cat_wpm(struct zmk_widget_bongo_cat *widget, int wpm) {
lv_anim_set_time(&widget->anim, 1000); lv_anim_set_time(&widget->anim, 1000);
lv_anim_set_values(&widget->anim, 0, 4); lv_anim_set_values(&widget->anim, 0, 4);
lv_anim_set_exec_cb(&widget->anim, set_img_src); lv_anim_set_exec_cb(&widget->anim, set_img_src);
lv_anim_set_repeat_count(&widget->anim, 10); lv_anim_set_repeat_count(&widget->anim, 1000);
lv_anim_set_repeat_delay(&widget->anim, 100); lv_anim_set_repeat_delay(&widget->anim, 100);
images = idle_images; images = idle_images;
current_anim_state = anim_state_idle; current_anim_state = anim_state_idle;

View file

@ -10,8 +10,8 @@
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_FAST_IMG1 uint8_t const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_FAST_IMG1 uint8_t
fast_img1_map[] = { fast_img1_map[] = {
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00,
@ -73,8 +73,8 @@ const lv_img_dsc_t fast_img1 = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_FAST_IMG2 uint8_t const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_FAST_IMG2 uint8_t
fast_img2_map[] = { fast_img2_map[] = {
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00,
@ -136,8 +136,8 @@ const lv_img_dsc_t fast_img2 = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG1 uint8_t const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG1 uint8_t
idle_img1_map[] = { idle_img1_map[] = {
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00,
@ -199,8 +199,8 @@ const lv_img_dsc_t idle_img1 = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG2 uint8_t const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG2 uint8_t
idle_img2_map[] = { idle_img2_map[] = {
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00,
@ -262,8 +262,8 @@ const lv_img_dsc_t idle_img2 = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG3 uint8_t const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG3 uint8_t
idle_img3_map[] = { idle_img3_map[] = {
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -325,8 +325,8 @@ const lv_img_dsc_t idle_img3 = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG4 uint8_t const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG4 uint8_t
idle_img4_map[] = { idle_img4_map[] = {
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@ -388,8 +388,8 @@ const lv_img_dsc_t idle_img4 = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG5 uint8_t const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_IDLE_IMG5 uint8_t
idle_img5_map[] = { idle_img5_map[] = {
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00,
@ -451,8 +451,8 @@ const lv_img_dsc_t idle_img5 = {
const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SLOW_IMG uint8_t const LV_ATTRIBUTE_MEM_ALIGN LV_ATTRIBUTE_LARGE_CONST LV_ATTRIBUTE_IMG_SLOW_IMG uint8_t
slow_img_map[] = { slow_img_map[] = {
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/ 0xfc, 0xfe, 0xfc, 0xff, /*Color of index 1*/
0x04, 0x02, 0x04, 0xff, /*Color of index 0*/
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x20, 0x00, 0x00, 0x00, 0x00,