rgblight_led_index() subtracts the clipping start position and returns a
uint8_t, so on the half whose clipping range does not start at 0 the LEDs
of the other half wrap around to indices like 252..255. Those reached
rgblight_driver.set_color() unchecked and, with the RP2040 vendor WS2812
driver, overwrote RAM past the LED buffer (the emulated EEPROM cache).
Skip indices outside the clipping range in setrgb() and route the direct
set_color() calls through it.
Fixes#26480
The mapping of CCW=VOLD, CW=VOLU was wrong in the original commit 13821fd,
but wasn't noticed because the pin mapping was _also_ wrong. The encoder
mapping was fixed in commit a73014f but that resulted in the encoder working
backwards. This commit corrects the pin mapping so that the encoder works as
expected.
* Add keyboard mini_mighty_kbd.
* Update keyboards/mini_mighty/kbd/keymaps/default/keymap.c
Co-authored-by: Jack Sangdahl <jack@pngu.org>
* Update keyboards/mini_mighty/kbd/keymaps/default/keymap.c
Co-authored-by: Jack Sangdahl <jack@pngu.org>
* Update keyboards/mini_mighty/kbd/keymaps/default/keymap.c
Co-authored-by: Jack Sangdahl <jack@pngu.org>
* Update keyboards/mini_mighty/kbd/keyboard.json
Co-authored-by: Jack Sangdahl <jack@pngu.org>
* Migrated features/build options from rules.mk to keyboard.json
* Update keyboards/mini_mighty/kbd/keymaps/default/keymap.c
Co-authored-by: Drashna Jaelre <drashna@live.com>
* Added a new layout with swapped backspace and backslash as default. Renamed the old layout as "legacy".
* Removed the "legacy" layout as it's no longer needed. All shipped mini-mighty-kbd units use the default layout.
* Updated the readme build instructions to use QMK compile instead of make.
---------
Co-authored-by: Jack Sangdahl <jack@pngu.org>
Co-authored-by: Drashna Jaelre <drashna@live.com>
fix(os_detection): don't classify macOS sequences as Windows
macOS 26.x (ChibiOS) can send a late wLength=0x04 packet after the two
0xFF packets that already established OS_MACOS. The Windows check
(cnt_ff >= 2 && cnt_04 >= 1) fired on this combination and overwrites
the correct result.
Real-world Windows sequences always start with 0xFF packets (cnt_02 = 0);
macOS sequences always open with at least two 0x02 packets (cnt_02 >= 2).
Adding && setups_data.cnt_02 < 2 to the Windows condition is sufficient
to separate the two populations without affecting any existing detection.
Adds a regression test for the affected sequence.
This change does two things:
* Rounds up instead of down, so that a low count check isn't needed.
* When the matrix col is odd, by rounding up, and checking if the right
and left indices are the same, skip one since we don't need to process
the same column twice.