tinyuf2 icon indicating copy to clipboard operation
tinyuf2 copied to clipboard

Custom Animation System

Open 203Null opened this issue 3 years ago • 9 comments

Is your feature request related to a problem? Please describe. A custom animation system for boards that has more complex LED.

Describe the solution you'd like I already made a solution for my own fork. https://github.com/203Electronics/Matrix-Bootloader/commit/5be0be79d0ea44c26edaed1cd995f1df341e1f5d But I would prefer this is supported upstream.

Describe alternatives you've considered Mentioned above,

Additional context https://github.com/203Electronics/Matrix-Bootloader/blob/bbea776965f24ec35122fcb3a7a0941923276599/ports/espressif/boards/boards.c#L197 Add this line to make ws2812 more stable. (Still glitches out sometimes, not sure why that is the case. I assume this has to with tinyUSB irq?)

203Null avatar Apr 05 '22 18:04 203Null

Demo: https://youtu.be/VedpKSH5nWM

203Null avatar Apr 05 '22 18:04 203Null

custom animation is totally OK, but it should be per-board configuration and default to existing one. custom animation code/function must be in myboard/board.c since it is board specific.

hathach avatar Apr 06 '22 03:04 hathach

custom animation is totally OK, but it should be per-board configuration and default to existing one. custom animation code/function must be in myboard/board.c since it is board specific.

Yes, that was the point. On my board.c I included #define CUSTOM_LED which overloads the animation system to the animation.c in the board folder.

203Null avatar Apr 06 '22 04:04 203Null

feel free to submit pr when you think it is ready.

hathach avatar Apr 06 '22 05:04 hathach

feel free to submit pr when you think it is ready.

If I want to submit a PR that means I will have to submit a compatible device that uses this system. I don't think my devices are appropriate on this repo, so should I port my code to a device like esp32-s3-devkit-1 and specify a pin for the RGB matrix?

203Null avatar Apr 06 '22 06:04 203Null

My current implementation prevents self-update to be build

c:/users/caine/.espressif/tools/xtensa-esp32s2-elf/esp-2021r2-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld.exe: esp-idf/src/libsrc.a(main.c.obj): in function board_timer_handler': C:/Users/caine/Documents/GitHub/Matrix-Bootloader/src/main.c:257: multiple definition of board_timer_handler'; esp-idf/boards/libboards.a(animation.c.obj):c:\users\caine\documents\github\matrix-bootloader\ports\espressif_build\matrix_block6_prototype1/../../boards/matrix_block6_prototype1/animation.c:70: first defined here

Will try get that fixed later

203Null avatar Apr 07 '22 04:04 203Null

feel free to submit pr when you think it is ready.

If I want to submit a PR that means I will have to submit a compatible device that uses this system. I don't think my devices are appropriate on this repo, so should I port my code to a device like esp32-s3-devkit-1 and specify a pin for the RGB matrix?

yes, since this is board specific, you should only apply this to board with rgb matrix like yours, the s3 devkit does not have this and could confuse other user. If your board is not ready to submit an PR, no problem at all, just wait until it is ready.

hathach avatar Apr 07 '22 11:04 hathach

If your board is not ready to submit an PR, no problem at all, just wait until it is ready.

My issue is that my board isn't a dev board so I don't think it should be on the tinyuf2 repo. But I'm pretty sure there are some dev boards with RGB matrix or someone wants to implement this on their own project.

203Null avatar Apr 07 '22 13:04 203Null

My issue is that my board isn't a dev board so I don't think it should be on the tinyuf2 repo. But I'm pretty sure there are some dev boards with RGB matrix or someone wants to implement this on their own project.

ah I see, your board is not in mass production as others. Yeah, in that case, using a popular devkit would be ideal, we will make it disabled by default.

hathach avatar Apr 07 '22 16:04 hathach