Fix lag issues when rgblight cannot connect to i2c rgb bridge (#354)
This commit is contained in:
@@ -63,6 +63,9 @@ static void unselect_rows(void);
|
||||
static void select_row(uint8_t row);
|
||||
|
||||
static uint8_t mcp23018_reset_loop;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
extern i2c_status_t i2c_rgblight;
|
||||
#endif
|
||||
|
||||
void matrix_init_custom(void) {
|
||||
// initialize row and col
|
||||
@@ -96,6 +99,9 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) {
|
||||
ergodox_blink_all_leds();
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
rgb_matrix_init(); // re-init driver on reconnect
|
||||
#endif
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
i2c_rgblight = 0x20; // re-enable rgb light
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user