倉庫指標
- Star
- (20,368 star)
- PR 合併指標
- (平均合併 20天 9小時) (30 天內合併 27 個 PR)
描述
Describe the Bug
The ergodox hotdox76v2 RGB_MATRIX configuration is incorrect when it comes to the right side RGB addressing. For example, the REACTIVE_SIMPLE mode works correctly on the left side, but the wrong key lights up on the right side i.e. when H is pressed, the key to the right of ; lights up. This is not ideal behaviour, clearly.
There is the same bug present in the yandrstudio version of the firmware, and that is where a lot of the discussion about this bug has taken place. I highly recommend reading this other bug report, as it gives a lot of insight into the problem, including a terrible hacky bugfix that I found that only sort of works.
https://github.com/Oh-My-Mechanical-Keyboard/qmk_firmware/issues/26
My keyboard is plugged into the computer on the left hand side, and the right hand side is plugged into the left. The right hand side, when adding just #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE to a config.h, at either keyboard or keymap level, does not light up properly; the left hand side does, but the right hand side is "offset" by five LED keys. The weirdest part is that as the last of the keys are pressed, the left hand side underglow keys light up. I can only imagine this to be a software and hardware matrix mismatch, where the hardware is layed out like /38/38/5/5 and the software is expecting /38/5/38/5. At least, that's my best guess at the cause given the problematic output.
The hacky fix, I'll post here, It makes it work rather well, except for the top right keys (which would normally light up the left hand underglow) just never light up in reactive modes. Well, that's not true; they hold the same color from the previous animation.
HACKY FIX:
diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
index f9584d7071..3334bc58ee 100644
--- a/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
+++ b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h
@@ -21,7 +21,14 @@ bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) {
uint16_t offset = scale16by8(tick, qadd8(rgb_matrix_config.speed, 1));
RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, offset));
- rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ // TODO/FIXME: This is the stupidest fix ever for the
+ // hotdox76v2 right hand side LED matrix being offset for
+ // reactive lighting.
+ if (is_keyboard_left()) {
+ rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
+ } else {
+ rgb_matrix_set_color(i + 5, rgb.r, rgb.g, rgb.b);
+ }
}
return rgb_matrix_check_finished_leds(led_max);
}
Keyboard Used
hotdox76v2
Link to product page (if applicable)
No response
Operating System
Windows 10
qmk doctor Output
No response
Is AutoHotKey / Karabiner installed
- AutoHotKey (Windows)
- Karabiner (macOS)
Other keyboard-related software installed
No response
Additional Context
No response