Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions crates/openlogi-device-registry/src/receiver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ impl ReceiverDescriptor {
pub const RECEIVERS: &[ReceiverDescriptor] = &[
ReceiverDescriptor::logitech(0xc52b, ReceiverBrand::Unifying, ReceiverProtocol::Unifying),
ReceiverDescriptor::logitech(0xc532, ReceiverBrand::Unifying, ReceiverProtocol::Unifying),
// Nano receiver bundled with budget wireless combos (e.g. MK270, MK295),
// limited to 2 paired devices — cross-checked against Solaar's
// NANO_RECEIVER_C534.
ReceiverDescriptor::logitech(0xc534, ReceiverBrand::Nano, ReceiverProtocol::Unifying),
Comment thread
greptile-apps[bot] marked this conversation as resolved.
// Nano receiver bundled with the G602.
ReceiverDescriptor::logitech(0xc537, ReceiverBrand::Nano, ReceiverProtocol::Unifying),
// Lightspeed gaming receiver used by the G502, G Pro Wireless, G604, and
Expand Down Expand Up @@ -122,6 +126,14 @@ mod tests {
assert_eq!(receiver.protocol, ReceiverProtocol::Unifying);
}

#[test]
fn mk270_mk295_nano_receiver_is_nano_over_unifying_protocol() {
let receiver = find_receiver(LOGITECH_VENDOR_ID, 0xc534).expect("c534 receiver");

assert_eq!(receiver.brand, ReceiverBrand::Nano);
assert_eq!(receiver.protocol, ReceiverProtocol::Unifying);
}

#[test]
fn lookup_requires_the_matching_vendor() {
assert!(find_receiver(0xffff, 0xc54d).is_none());
Expand Down
Loading