ryankurte / rust-streamdeck

libusb based driver for Elgato StreamDeck devices
Mozilla Public License 2.0
60 stars 24 forks source link

Revised mini's keys are 1-indexed rather than 0-indexed #30

Closed keirlawson closed 5 months ago

keirlawson commented 5 months ago

Running the following on my streamdeck mini (revised version) sets the top left button's colour

cargo run -- --pid 0090 set-colour 1 --b 100 --g 100 --r 100

However, running the equivalent command against the Mk2 sets the 2nd from left button:

cargo run -- --pid 0080 set-colour 1 --b 100 --g 100 --r 100
ryankurte commented 5 months ago

oh fun! guess we should probably detect and patch that so the API stays consistent.

keirlawson commented 5 months ago

Ok, I guess translate_key_index is the place to do that, just wondering if its worth introducing a new button_offset field on Kind or whether we should just directly check for the revised mini, thoughts?

ryankurte commented 5 months ago

don't think it matters too much, but, i'd lean towards the latter because it's sorta nice having all the quirks described in the Kind object