Merge pull request #508 from keyboardio/plugin/LED-ActiveModColor/init-fix

LED-ActiveModColor: Use lookupOnActiveLayer() instead of lookup()
pull/509/head
Jesse Vincent 6 years ago committed by GitHub
commit 0a5b2c36e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -39,7 +39,7 @@ EventHandlerResult ActiveModColorEffect::onLayerChange() {
for (byte r = 0; r < ROWS; r++) { for (byte r = 0; r < ROWS; r++) {
for (byte c = 0; c < COLS; c++) { for (byte c = 0; c < COLS; c++) {
Key k = Layer.lookup(r, c); Key k = Layer.lookupOnActiveLayer(r, c);
if (::OneShot.isOneShotKey(k) || if (::OneShot.isOneShotKey(k) ||
(k.raw >= Key_LeftControl.raw && k.raw <= Key_RightGui.raw) || (k.raw >= Key_LeftControl.raw && k.raw <= Key_RightGui.raw) ||
@ -59,7 +59,7 @@ EventHandlerResult ActiveModColorEffect::beforeReportingState() {
byte c = coords % COLS; byte c = coords % COLS;
byte r = (coords - c) / COLS; byte r = (coords - c) / COLS;
Key k = Layer.lookup(r, c); Key k = Layer.lookupOnActiveLayer(r, c);
if (::OneShot.isOneShotKey(k)) { if (::OneShot.isOneShotKey(k)) {
if (::OneShot.isSticky(k)) if (::OneShot.isSticky(k))

Loading…
Cancel
Save