You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue focuses on Implementing LED effect by modifying keymap.c only.
Effect showcase is available in video linked in source project (more patterns are added since then)
Ideas
This feature is quite complete in the source project, which is however forked from Massdrop's base, thus not compatible with this mother qmk project (they have additional feature like led_instructions). I am working on porting it to qmk (several methods are possible, more below), which is the main point of this issue.
I failed to get <rgblight.h> working, it is why I try to use led_map->rgb (in qmk) or led_instruction_t led_instructions[] (in Massdrop) instead.
"Why so stubborn to only use keymap.c?": I thought it would be less intrusive to other part of the project. It is welcome to be offered any better solutions.
What I am working on currently
Porting from source project to be compatible to this base project (as mentioned)
several ways are proposed (tested):
setting led_per_run = 1 and modify led rgb values in keymap.c: matrix_scan_user() (in each and every invocation)
potential problem: performance, (might, although unlikely, not working on other occasion)
The reason setting led_per_run = 1 is because modifying rgb in matrix_scan_user() causes racing with arm_atsam/led_matrix.c: led_matrix_run(), which makes some led's rgb is modified again in led_matrix_run() after matrix_scan_user() if led_per_run is 15 (default value).
set led_lighting_mode = LED_MODE_KEYS_ONLY and modify led_cur->scan
in tmk_core/protocol/arm_atsam/led_matrix.c: led_matrix_run(): line 311 doing so would skip certain led, so the overriding and racing problem as mentioned above can be avoided.
problem: Fn + Z toggle led mode would not behave normally.
modify led_matrix_run() by modifying tmk_core/protocol/arm_atsam/led_matrix.c, or overriding such function in keymap.c (which is possible because led_matrix_run() has __attribute__((weak)) reference)
open up many possibilities, able to cover the problems of above methods.
problem: need to submit pull request / merge branch
The text was updated successfully, but these errors were encountered:
Feature Request Type
Description
related (pull request)
source project
This issue focuses on Implementing LED effect by modifying
keymap.c
only.Effect showcase is available in video linked in source project (more patterns are added since then)
Ideas
led_instructions
). I am working on porting it to qmk (several methods are possible, more below), which is the main point of this issue.<rgblight.h>
working, it is why I try to useled_map->rgb
(in qmk) orled_instruction_t led_instructions[]
(in Massdrop) instead.keymap.c
?": I thought it would be less intrusive to other part of the project. It is welcome to be offered any better solutions.What I am working on currently
Porting from source project to be compatible to this base project (as mentioned)
several ways are proposed (tested):
led_per_run = 1
and modify led rgb values inkeymap.c: matrix_scan_user()
(in each and every invocation)led_per_run = 1
is because modifying rgb inmatrix_scan_user()
causes racing witharm_atsam/led_matrix.c: led_matrix_run()
, which makes some led's rgb is modified again inled_matrix_run()
aftermatrix_scan_user()
ifled_per_run
is15 (default value)
.led_lighting_mode = LED_MODE_KEYS_ONLY
and modifyled_cur->scan
tmk_core/protocol/arm_atsam/led_matrix.c: led_matrix_run(): line 311
doing so would skip certain led, so the overriding and racing problem as mentioned above can be avoided.Fn + Z
toggle led mode would not behave normally.led_matrix_run()
by modifyingtmk_core/protocol/arm_atsam/led_matrix.c
, or overriding such function inkeymap.c
(which is possible becauseled_matrix_run()
has__attribute__((weak))
reference)The text was updated successfully, but these errors were encountered: