Closed HaxSam closed 7 months ago
i see, yeah this could work. however, if the case you explain where it doesnt manage to update properly happens at boot, or when changing brightness, then it would remain glitched... i guess this is good enough for now, but would be ideal to find why it can bug out at all and fix that instead eventually
I could go more in depth what's happening there, but I think the main problem is that it tries to update the RGB settings on every single button press and sometimes some other workflow gets in the way and disturbs the RGB update in the bit stream.
interesting... i see there is furi_kernel_lock()
and unlock around the rgb backlight driver update... these functions are not used anywhere else, instead those highly sensitive usages tend to use FURI_CRITICAL_ENTER()
and exit... can you try changing that?
I reverted my changes and tried it with FURI_CRITICAL_ENTER()
but the bug still remains, for example when I use orgasmotron the RGB color will change but instead of flickering it stays at a solid color when I held a button pressed.
On the other hand, the bug doesn't occur anymore on animation change.
In the log trace I still see that it does an RGB update on every button press.
interesting. i will merge this, but i also want to get to the bottom of this. what you say with the orgasmotron app makes me wonder if a mutex between rgb driver and vibro motor would solve it. but then again, notification service uses a event queue, so theoretically only one or the other should be happening / changing state at any given time... unless this is some hardware interrupt magic that goes way over my head...
I had the idea that I could try to debug with GDB when I get my dev board, but overall I would need a deeper understanding of the firmware to help to find a proper fix.
I would do the same, but have no rgb backlight xD
(Yet)
Gonna get my dev board on Monday when I figure something out, we could discuss it on discord maybe.
What's new
the behavior before was on sometimes on button clicks the RGB couldn't be fully update and flicker for a second to another color and looked really buggy
For the reviewer