VVEIRD / StreamDeckCore

Java implementation for the Elgato Stream Deck
MIT License
30 stars 14 forks source link

[Feature Request] ESD Mini Support #1

Open tscholze opened 5 years ago

tscholze commented 5 years ago

Before anything else, I want to say that this project is awesome! It looks like you put a lot of effort into the architecture, etc. pp. So great!

Nonetheless, do you plan to support the ESD Mini?

The new device has (of course) another Device Id, less buttons and some other differences compared to the "large" ESD.

I tried by myself, but I do not get how the byte arrays to set the values work or how to you get the numbers of exact amout of pixels per page. Frustrating.

Keep on coding! :)

VVEIRD commented 5 years ago

Thanks for your kind words and sorry for the late answer, I wasn't as active in this project as of late.

I'd love to implement the StreamDeck Mini, but as of now I don't have the hardware around. So for now I have to postpone the implementation until I have the time and money to work on that.

tscholze commented 5 years ago

@VVEIRD thanks for your reply. I fully understand your standpoint. I'll watch the respository or, if I get better in doing such things, I'll create a pull request with this feature.

Would it be possible that you could add a simple comment to the matrix stuff? That seems to be very hard logic.

Have a nice day!

VVEIRD commented 5 years ago

I can try to write it out.

I think I overcomplicated it a bit. So essentially this is what happens:

The Image is sent in two USB output reports. Each report has a length of 7819 bytes.

Each the first and the second report has its own header.

Byte No 5 of each header is the button id, the order is from top right (1) to bottom left (15).

To send an 72x72 image to one button you'll have to:

  1. Save the RGB bytes of the image in reverse: [1...x] -> [x...1], no alpha value
  2. Merge header 1 with the first 7749 bytes of the image, set byte 5 to the Button No for the first report
  3. Merge header 2 with the remaining bytes of the image, set byte 5 to the Button No for the second report
  4. Send report on, then report 2.

For me to understand it more, the following project code helped me: https://github.com/danieltian/stream-deck-api/blob/master/lib/page-data.js