diff options
author | Drashna Jaelre <drashna@live.com> | 2020-10-23 02:13:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-23 20:13:14 +1100 |
commit | 9093f877a2f7b23576cbd03140acf2904d2a1c92 (patch) | |
tree | 1e0d31c2d467272da8e1707d9afdaaa2ecef639b | |
parent | 5e9c078c7846d93b67e1c94a24b4c50781d739f2 (diff) |
[Keyboard] Fix Moonlander indicator LEDs during sleep (#10683)
-rw-r--r-- | keyboards/moonlander/matrix.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/keyboards/moonlander/matrix.c b/keyboards/moonlander/matrix.c index df498bd6e3..872643f61d 100644 --- a/keyboards/moonlander/matrix.c +++ b/keyboards/moonlander/matrix.c @@ -272,8 +272,7 @@ void matrix_print(void) { // DO NOT REMOVE // Needed for proper wake/sleep void matrix_power_up(void) { - mcp23018_init(); - + bool temp_launching = is_launching; // outputs setPinOutput(B10); setPinOutput(B11); @@ -291,6 +290,17 @@ void matrix_power_up(void) { setPinInputLow(A7); setPinInputLow(B0); + mcp23018_init(); + is_launching = temp_launching; + if (!is_launching) { + ML_LED_1(false); + ML_LED_2(false); + ML_LED_3(false); + ML_LED_4(false); + ML_LED_5(false); + ML_LED_6(false); + } + // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) { matrix[i] = 0; |