mirror of
https://github.com/xzeldon/razer-battery-report.git
synced 2024-12-25 06:25:49 +00:00
feat: add DeathAdder V3 HyperSpeed support (#1)
This commit is contained in:
parent
f5349a56a5
commit
21f631f68c
@ -10,9 +10,9 @@
|
||||
|
||||
Show your wireless Razer devices battery levels in your system tray.
|
||||
|
||||
> This is a work in progress and currently support only **Razer DeathAdder V3 Pro**.
|
||||
> This is a work in progress and currently support only **Razer DeathAdder V3 Pro** and **Razer DeathAdder V3 HyperSpeed**.
|
||||
|
||||
> Currently, this works only on **Windows**, should work on **Linux** if you _add udev rule to get access to usb devices_ (see [here](https://github.com/libusb/hidapi/blob/master/udev/69-hid.rules)) and remove/`cfg(windows)` some platform-specific code. But I haven't tested yet.
|
||||
> Currently, this works only on **Windows**.
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -28,7 +28,9 @@ impl DeviceInfo {
|
||||
pub const fn transaction_id(&self) -> u8 {
|
||||
match self.pid {
|
||||
pid if pid == RAZER_DEATHADDER_V3_PRO_WIRED.pid
|
||||
|| pid == RAZER_DEATHADDER_V3_PRO_WIRELESS.pid =>
|
||||
|| pid == RAZER_DEATHADDER_V3_PRO_WIRELESS.pid
|
||||
|| pid == RAZER_DEATHADDER_V3_HYPERSPEED_WIRED.pid
|
||||
|| pid == RAZER_DEATHADDER_V3_HYPERSPEED_WIRELESS.pid =>
|
||||
{
|
||||
0x1F
|
||||
}
|
||||
@ -38,11 +40,18 @@ impl DeviceInfo {
|
||||
}
|
||||
|
||||
pub const RAZER_DEATHADDER_V3_PRO_WIRED: DeviceInfo =
|
||||
DeviceInfo::new("Razer DeathAdder V3 Pro", 0x00B6, 0, 1, 2);
|
||||
DeviceInfo::new("Razer DeathAdder V3 Pro (Wired)", 0x00B6, 0, 1, 2);
|
||||
pub const RAZER_DEATHADDER_V3_PRO_WIRELESS: DeviceInfo =
|
||||
DeviceInfo::new("Razer DeathAdder V3 Pro", 0x00B7, 0, 1, 2);
|
||||
DeviceInfo::new("Razer DeathAdder V3 Pro (Wireless)", 0x00B7, 0, 1, 2);
|
||||
|
||||
pub const RAZER_DEVICE_LIST: [DeviceInfo; 2] = [
|
||||
pub const RAZER_DEATHADDER_V3_HYPERSPEED_WIRED: DeviceInfo =
|
||||
DeviceInfo::new("Razer DeathAdder V3 HyperSpeed (Wired)", 0x00C4, 0, 1, 2);
|
||||
pub const RAZER_DEATHADDER_V3_HYPERSPEED_WIRELESS: DeviceInfo =
|
||||
DeviceInfo::new("Razer DeathAdder V3 HyperSpeed (Wireless)", 0x00C5, 0, 1, 2);
|
||||
|
||||
pub const RAZER_DEVICE_LIST: [DeviceInfo; 4] = [
|
||||
RAZER_DEATHADDER_V3_PRO_WIRED,
|
||||
RAZER_DEATHADDER_V3_PRO_WIRELESS,
|
||||
RAZER_DEATHADDER_V3_HYPERSPEED_WIRED,
|
||||
RAZER_DEATHADDER_V3_HYPERSPEED_WIRELESS,
|
||||
];
|
||||
|
Loading…
Reference in New Issue
Block a user