-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented Input events, SD+ support (partial) #33
Comments
hey @BIightning these seem like great improvements! if you'd like to contribute my preference would be separate PRs for different functions / units of work, it's a little more hassle from your side but makes reviewing and thinking about things easier for me. some feedback:
From a quick look at your code it seems like you're missing the padding on the last maybe partial chunk? also in rust you can replace a bunch of the slicing things up logic with |
Alright, sounds good to me, I'll split it up into 4 pull requests then?
|
So, for the get-buttons method with SD Plus: The second byte that the SD sends determines what input type is used: Buttons(0), Touchscreen(2) or Dial(3). If we receive one of the latter input types, we get incorrect button input data because the data is written to some of the same indeces used for buttons. We can easily catch it, but what should we do here? Return a new error variant (maybe An error would immediatly stop the cli with option --continuous right now. EDIT: Erroring out seems the most logical imo, will implement that instead |
Hi @ryankurte , I implemented some new features in my fork
Input events
As you can see, I added a new get-input command that returns an input event enum on press. It's obviously not as lightweight as the current get-buttons command, but much nicer to work with in my opinion.
Streamdeck Plus Support
Buttons, Dials (Press and turn) and Touch (short, long, drag) input events work as you can see in the image above.
The only thing that doesn't work right now is writing images to the touchscreen. I took the python library as a reference, but everytime I try writing to the touchscreen, it shows garbage and crashes shortly after. Not sure why, but I normally don't program "low level" stuff like this. Could use help on that :) Also the main reason why I didn't open a pull request yet.
Probe
Just a simple function that returns all connected Streamdecks.
It's a bit pointless with the current cli, as you need to provide a pid to run the probe command.
The branch a bit messy right now, as I created several near identical functions for the touchscreen image logic but I'd really like to collaborate and bring this to the main repo.
What do you think?
The text was updated successfully, but these errors were encountered: