Laverita v3 support #22

Merged
sr1canskhsia merged 1 commits from main into main 2025-03-22 16:43:21 +03:00
sr1canskhsia commented 2025-03-22 07:34:40 +03:00 (Migrated from github.com)

Tested on my own controller

Laverita v3 seems to require USB interface number 3. Couldn't find a way around it

Protocol information from https://gitea.tendokyu.moe/beerpsi/chuniio-rs/src/branch/trunk/src/backends/laverita_v3.rs

# Laverita v3
USB device: 0518:2022

USB interface: 3

## Protocol information

### IN Interrupt (0x83)
- Content length: 34 bytes
- Byte 0: Service, Test and Air sensors
  - From MSB to LSB:  X X X X  X X X X
  - Service:          ^
  - Test:               ^
  - Air sensors:          5 6  3 4 1 2
- Byte 1: 0x00
- Bytes 2..33: Slider pressure (top -> bottom, then left -> right)

### OUT Interrupt (0x03)
- Total Content length: 122 bytes
- Split into 2 packets
- Packet 0 (61 bytes):
  - Byte 0: Packet index (0x00)
  - Bytes 1..60: Slider LEDs 1-20 (RGB order, right -> left)
- Packet 1 (61 bytes):
  - Byte 0: Packet index (0x01)
  - Bytes 1..33: Slider LEDs 21-31 (RGB order, right -> left)
  - Bytes 34..60: Empty padding
Tested on my own controller Laverita v3 seems to require USB interface number 3. Couldn't find a way around it Protocol information from https://gitea.tendokyu.moe/beerpsi/chuniio-rs/src/branch/trunk/src/backends/laverita_v3.rs ``` # Laverita v3 USB device: 0518:2022 USB interface: 3 ## Protocol information ### IN Interrupt (0x83) - Content length: 34 bytes - Byte 0: Service, Test and Air sensors - From MSB to LSB: X X X X X X X X - Service: ^ - Test: ^ - Air sensors: 5 6 3 4 1 2 - Byte 1: 0x00 - Bytes 2..33: Slider pressure (top -> bottom, then left -> right) ### OUT Interrupt (0x03) - Total Content length: 122 bytes - Split into 2 packets - Packet 0 (61 bytes): - Byte 0: Packet index (0x00) - Bytes 1..60: Slider LEDs 1-20 (RGB order, right -> left) - Packet 1 (61 bytes): - Byte 0: Packet index (0x01) - Bytes 1..33: Slider LEDs 21-31 (RGB order, right -> left) - Bytes 34..60: Empty padding ```
4yn commented 2025-03-22 16:46:15 +03:00 (Migrated from github.com)

Looks good from my side, got some help to verify that it works too. Thank you for the pull request.

Looks good from my side, got some help to verify that it works too. Thank you for the pull request.
Sign in to join this conversation.