qmk/qmk_firmware

[Bug] GMMK2 65% ANSI - LED coordinates misaligned (and potential fix)

Open

#22.769 aperta il 27 dic 2023

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)C (43.867 fork)batch import
bughelp wanted

Metriche repository

Star
 (20.368 star)
Metriche merge PR
 (Merge medio 20g 9h) (27 PR mergiate in 30 g)

Descrizione

Describe the Bug

When using reactive effects (especially column-based, like RGB_MATRIX_SOLID_REACTIVE_CROSS), there is a noticeable LEDs misalignment, mainly on a bottom row. For example, when pressing "RAlt" with cross effect enabled, a column from "M" to "8" is lit. and not from ">" to "0" as expected.

The values in gmmk/gmmk2/p65/ansi/ansi.c:g_led_config are the cause: for example, Alt_R and M keys share the exact same X coord, which is clearly incorrect.

I found a top-down picture of the keyboard, cropped it and roughly translated LED pixel coordinates to QMK's standard range. With those values put into g_led_config, reactive effects look in place, and there is no bottom row misalignment.

The resulting g_led_config is the following. I can create a pull request, if this solution is confirmed to be correct.

led_config_t g_led_config = {{
    { 44, 57, __, 64, __, 66, 58, 55},
    { 16, 15, 31,  0, 45, 59, __,  1},
    { 17, 30, 32, 60, 46, 14, 29,  2},
    { 18, 61, 33, 63, 47, 56, 62,  3},
    { 19, 20, 34, 35, 48, 49,  5,  4},
    { 22, 21, 37, 36, 51, 50,  6,  7},
    { 23, 27, 38, __, 52, 43, 12,  8},
    { 24, 13, 39, 65, 53, __, 28,  9},
    { 25, 26, 40, 41, 42, 54, 11, 10}
}, {
    {10,  0 }, //  0  Esc
    {24,  0 }, //  1  1
    {38,  0 }, //  2  2
    {52,  0 }, //  3  3
    {66,  0 }, //  4  4
    {80,  0 }, //  5  5
    {94,  0 }, //  6  6
    {108, 0 }, //  7  7
    {122, 0 }, //  8  8
    {136, 0 }, //  9  9
    {150, 0 }, //  10 0
    {164, 0 }, //  11 -
    {178, 0 }, //  12 =
    {194, 0 }, //  13 Backspace
    {214, 0 }, //  14 Del

    {14,  16}, //  15 Tab
    {30,  16}, //  16 Q
    {44,  16}, //  17 W
    {58,  16}, //  18 E
    {72,  16}, //  19 R
    {86,  16}, //  20 T
    {100, 16}, //  21 Y
    {114, 16}, //  22 U
    {128, 16}, //  23 I
    {142, 16}, //  24 O
    {156, 16}, //  25 P
    {170, 16}, //  26 [
    {184, 16}, //  27 ]
    {196, 16}, //  28 \|
    {214, 16}, //  29 PgUp

    {16,  32}, //  30 Caps Lock
    {34,  32}, //  31 A
    {48,  32}, //  32 S
    {62,  32}, //  33 D
    {76,  32}, //  34 F
    {90,  32}, //  35 G
    {104, 32}, //  36 H
    {118, 32}, //  37 J
    {132, 32}, //  38 K
    {146, 32}, //  39 L
    {160, 32}, //  40 ;
    {174, 32}, //  41 '
    {192, 32}, //  42 Enter
    {214, 32}, //  43 PgDn

    {20,  48}, //  44 Shift_L
    {42,  48}, //  45 Z
    {56,  48}, //  46 X
    {70,  48}, //  47 C
    {84,  48}, //  48 V
    {98,  48}, //  49 B
    {112, 48}, //  50 N
    {126, 48}, //  51 M
    {140, 48}, //  52 ,
    {154, 48}, //  53 .
    {168, 48}, //  54 /
    {182, 48}, //  55 Shift_R
    {200, 48}, //  56 Up
    {214, 48}, //  57 END

    {12,  64}, //  58 Ctrl_L
    {30,  64}, //  59 Win_L
    {48,  64}, //  60 Alt_L
    {96,  64}, //  61 Space
    {148, 64}, //  62 Alt_R
    {166, 64}, //  63 FN
    {188, 64}, //  64 Left
    {200, 64}, //  65 Down
    {214, 64}, //  66 Right

    {0,   0},  //  69 LED 1
    {0,   7},  //  70 LED 2
    {0,   14}, //  71 LED 3
    {0,   21}, //  72 LED 4
    {0,   28}, //  73 LED 5
    {0,   35}, //  74 LED 6
    {0,   42}, //  75 LED 7
    {0,   49}, //  76 LED 8
    {0,   56}, //  77 LED 9
    {0,   64}, //  78 LED 10
    {224, 0 }, //  79 LED 11
    {224, 7 }, //  80 LED 12
    {224, 14}, //  81 LED 13
    {224, 21}, //  82 LED 14
    {224, 28}, //  83 LED 15
    {224, 35}, //  84 LED 16
    {224, 42}, //  85 LED 17
    {224, 49}, //  86 LED 18
    {224, 56}, //  87 LED 19
    {224, 64}, //  88 LED 20
}, {
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
    4, 4, 4, 4, 4, 4, 4, 4, 4,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
    2, 2, 2, 2, 2, 2, 2, 2, 2, 2
} };

Keyboard Used

gmmk/gmmk2/p65/ansi

Link to product page (if applicable)

https://www.gloriousgaming.com/products/gmmk2

Operating System

Windows

qmk doctor Output

Ψ QMK Doctor is checking your environment.
Ψ CLI version: 1.1.2
Ψ QMK home: C:/Users/tri4ng1e/qmk_firmware
Ψ Detected Windows 10 (10.0.22621).
Ψ QMK MSYS version: 1.8.0
Ψ Testing userspace candidate: C:/Users/tri4ng1e/qmk_userspace -- Valid `qmk.json`
Ψ QMK userspace: C:/Users/tri4ng1e/qmk_userspace
Ψ Userspace enabled: True
Ψ Git branch: master
Ψ Repo version: 0.23.2
⚠ Git has unstashed/uncommitted changes.
Ψ - Latest master: 2023-12-24 13:16:34 -0500 (83b84187ea) -- [Keyboard] Add Noodlepad_Micro (#22703)
Ψ - Latest upstream/master: 2023-12-27 12:12:42 +1100 (cc08f230ff) -- bm40hsrgb/rev2: disable some RGB Matrix effects to reduce filesize (#22761)
Ψ - Latest upstream/develop: None
Ψ - Common ancestor with upstream/master: 2023-12-24 13:16:34 -0500 (83b84187ea) -- [Keyboard] Add Noodlepad_Micro (#22703)
Ψ - Common ancestor with upstream/develop: None
Ψ All dependencies are installed.
Ψ Found arm-none-eabi-gcc version 12.2.0
Ψ Found avr-gcc version 12.2.0
⚠ We do not recommend avr-gcc newer than 8. Downgrading to 8.x is recommended.
Ψ Found avrdude version 7.0
Ψ Found dfu-programmer version 1.1.0
Ψ Found dfu-util version 0.11
Ψ Submodules are up to date.
Ψ Submodule status:
Ψ - lib/chibios: 2023-04-15 13:48:04 +0000 --  (11edb1610)
Ψ - lib/chibios-contrib: 2023-07-17 11:39:05 +0200 --  (da78eb37)
Ψ - lib/googletest: 2021-06-11 06:37:43 -0700 --  (e2239ee6)
Ψ - lib/lufa: 2022-08-26 12:09:55 +1000 --  (549b97320)
Ψ - lib/vusb: 2022-06-13 09:18:17 +1000 --  (819dbc1)
Ψ - lib/printf: 2022-06-29 23:59:58 +0300 --  (c2e3b4e)
Ψ - lib/pico-sdk: 2023-02-12 20:19:37 +0100 --  (a3398d8)
Ψ - lib/lvgl: 2022-04-11 04:44:53 -0600 --  (e19410f8)
Ψ QMK is ready to go, but minor problems were found

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

Guida contributor