Add additional hooks for Community modules (#25050)

This commit is contained in:
Drashna Jaelre 2025-05-04 17:21:47 -07:00 committed by GitHub
parent bb9dd05c6a
commit 12caf0be4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 137 additions and 13 deletions

View file

@ -358,7 +358,12 @@ void led_matrix_task(void) {
}
}
__attribute__((weak)) bool led_matrix_indicators_modules(void) {
return true;
}
void led_matrix_indicators(void) {
led_matrix_indicators_modules();
led_matrix_indicators_kb();
}
@ -370,6 +375,10 @@ __attribute__((weak)) bool led_matrix_indicators_user(void) {
return true;
}
__attribute__((weak)) bool led_matrix_indicators_advanced_modules(uint8_t led_min, uint8_t led_max) {
return true;
}
void led_matrix_indicators_advanced(effect_params_t *params) {
/* special handling is needed for "params->iter", since it's already been incremented.
* Could move the invocations to led_task_render, but then it's missing a few checks
@ -377,6 +386,7 @@ void led_matrix_indicators_advanced(effect_params_t *params) {
* led_task_render, right before the iter++ line.
*/
LED_MATRIX_USE_LIMITS_ITER(min, max, params->iter - 1);
led_matrix_indicators_advanced_modules(min, max);
led_matrix_indicators_advanced_kb(min, max);
}