temp dz60rgb fix
This commit is contained in:
+4
-3
@@ -354,11 +354,12 @@ void openrgb_direct_mode_set_single_led(uint8_t *data) {
|
||||
raw_hid_buffer[RAW_EPSIZE - 2] = OPENRGB_SUCCESS;
|
||||
}
|
||||
void openrgb_direct_mode_set_leds(uint8_t *data) {
|
||||
const uint8_t number_leds = data[1];
|
||||
const uint8_t first_led = data[1];
|
||||
const uint8_t number_leds = data[2];
|
||||
|
||||
for (uint8_t i = 0; i < number_leds; i++) {
|
||||
const uint8_t data_idx = i * 4;
|
||||
const uint8_t color_idx = data[data_idx + 2];
|
||||
const uint8_t color_idx = first_led + i;
|
||||
const uint8_t data_idx = i * 3;
|
||||
|
||||
g_openrgb_direct_mode_colors[color_idx].r = data[data_idx + 3];
|
||||
g_openrgb_direct_mode_colors[color_idx].g = data[data_idx + 4];
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
|
||||
// This is changed only when the command IDs change,
|
||||
// so OpenRGB can detect compatible firmware.
|
||||
#define OPENRGB_PROTOCOL_VERSION 0xD
|
||||
#define OPENRGB_PROTOCOL_VERSION 0xC
|
||||
|
||||
#define RAW_EPSIZE 64
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ __attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) {
|
||||
# ifdef OPENRGB_ENABLE
|
||||
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_OPENRGB_DIRECT
|
||||
# else
|
||||
# ifdef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
# ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||
# else
|
||||
// fallback to solid colors if RGB_MATRIX_CYCLE_LEFT_RIGHT is disabled in userspace
|
||||
|
||||
Reference in New Issue
Block a user