Skip to content

Commit ee7ffd1

Browse files
committed
Fix incorrect handling of effect response
1 parent e8986c9 commit ee7ffd1

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description = "VIA api implementation for QMK-based keyboards"
55
authors = ["Stephan Rumswinkel"]
66
repository = "https://github.com/srwi/qmk-via-api"
77
readme = "README.md"
8-
version = "0.2.0"
8+
version = "0.2.1"
99
edition = "2021"
1010

1111
[lib]

src/api.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ impl KeyboardApi {
368368
ViaQmkBacklightValue::IdQmkBacklightEffect as u8,
369369
],
370370
)
371-
.map(|val| val[2])
371+
.map(|val| val[3])
372372
}
373373

374374
/// Sets the backlight effect.
@@ -418,7 +418,7 @@ impl KeyboardApi {
418418
ViaQmkRgblightValue::IdQmkRgblightEffect as u8,
419419
],
420420
)
421-
.map(|val| val[2])
421+
.map(|val| val[3])
422422
}
423423

424424
/// Sets the RGB light effect.
@@ -443,7 +443,7 @@ impl KeyboardApi {
443443
ViaQmkRgblightValue::IdQmkRgblightEffectSpeed as u8,
444444
],
445445
)
446-
.map(|val| val[2])
446+
.map(|val| val[3])
447447
}
448448

449449
/// Sets the RGB light effect speed.
@@ -519,7 +519,7 @@ impl KeyboardApi {
519519
ViaQmkRgbMatrixValue::IdQmkRgbMatrixEffect as u8,
520520
],
521521
)
522-
.map(|val| val[2])
522+
.map(|val| val[3])
523523
}
524524

525525
/// Sets the RGB matrix effect.
@@ -544,7 +544,7 @@ impl KeyboardApi {
544544
ViaQmkRgbMatrixValue::IdQmkRgbMatrixEffectSpeed as u8,
545545
],
546546
)
547-
.map(|val| val[2])
547+
.map(|val| val[3])
548548
}
549549

550550
/// Sets the RGB matrix effect speed.
@@ -620,7 +620,7 @@ impl KeyboardApi {
620620
ViaQmkLedMatrixValue::IdQmkLedMatrixEffect as u8,
621621
],
622622
)
623-
.map(|val| val[2])
623+
.map(|val| val[3])
624624
}
625625

626626
/// Sets the LED matrix effect.
@@ -645,7 +645,7 @@ impl KeyboardApi {
645645
ViaQmkLedMatrixValue::IdQmkLedMatrixEffectSpeed as u8,
646646
],
647647
)
648-
.map(|val| val[2])
648+
.map(|val| val[3])
649649
}
650650

651651
/// Sets the LED matrix effect speed.

0 commit comments

Comments
 (0)