magicmonkey / go-streamdeck Goto Github PK
View Code? Open in Web Editor NEWGo interface to an Elgato Streamdeck
License: MIT License
Go interface to an Elgato Streamdeck
License: MIT License
Describe the bug
I made several imagefile buttons, and one of them crashes consistently when applying a decorator.
Streamdeck version
XL
Additional context
Crash is in the Apply() method and complains that the image is not an RGBA type.
Currently the code will only support 1 listener as the USB comms is inside of the listener loop and only 1 thing can do that. Needs the listening code separating from the call-the-callbacks code.
Remove instances of panic
or fmt.Println
for error cases
Currently, only the Streamdeck XL (32-button version) is supported. It would be good to support the original (15 buttons) and mini (6 buttons) as well.
Describe the bug
There's a hard-coded "96" in the border decorator code
Streamdeck version
Anything except an XL
Additional context
This needs to look at the dimensions of the incoming image, rather than looking up what streamdeck is in use.
Describe the bug
I'm using SetDecorator
and UnsetDecorator
on my streamdeck buttons. This works perfectly for a text button but doesn't undecorate the ImageFileButton
ones. No error, just the decorator persists.
Streamdeck version
XL (32 buttons)
To Reproduce
Add one ImageFileButton and one TextButton, have them turn decorators on and off. The Text one works, but the image one doesn't
Expected behavior
I expected UnsetDecorator to undecorate on an image button as well as on a text one.
Environment (please complete the following information):
go version go1.14.3 linux/amd64
Additional context
Add any other context about the problem here.
Describe the bug
When using an image larger than the Stream Deck mini's key size (80x80), then the image doesn't apply
Streamdeck version
Mini (6 buttons)
To Reproduce
Create new Image File Button and launch the go program
func (s *Screenshot) Buttons() {
// Command
myButton, err := buttons.NewImageFileButton(viper.GetString("buttons.images") + "/screenshot.png")
if err != nil {
log.Error().Err(err).Msg("Could not load image")
}
shotaction := &sdactionhandlers.CustomAction{}
shotaction.SetHandler(func(btn streamdeck.Button) {
go takeScreenshot()
})
myButton.SetActionHandler(shotaction)
s.SD.AddButton(s.ButtonId, myButton)
}
Expected behavior
Image should resize, rotate, and display regardless of size.
Environment (please complete the following information):
Registering a button callback means that the Go program will never end. Either allow it to be detached, or alternatively make it based on channels so it becomes a concern for the calling code.
Either way, calling the Close()
method should shut it down.
Currently text draws on a single line. Would be good to word-wrap it, although as it isn't a fixed-width font, this will involve some tricky maths.
The comms can get into a "de-sync'd" state, if a bad message is sent, which leaves the streamdeck in a non-responsive mode and all the comms is slow as it waits for an end to a half-done packet. There's a "reset" packet which can be sent, which should be used (at least) every time it's Open()
'd and possibly periodically in between times, just in case.
Need contributing guidelines, whether for code, testing, feature requests, suggestions, pointers to usage by other projects, etc.
Describe the bug
After you set a decorator on a button, you can't unset it.
Streamdeck version
All versions
To Reproduce
Add a decorator to a button, then try to remove it. There is no interface for it.
Make a way to render text into an image to put onto a button
When I give an invalid file name to an image, the whole program stops. Can we use a default image or something in this situation?
JPEGs, PNGs, etc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.