Coder Social home page Coder Social logo

go-streamdeck's People

Contributors

derickr avatar dhollinger avatar fabianexe avatar juwit avatar lornajane avatar magicmonkey avatar s00500 avatar tuomaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

go-streamdeck's Issues

[BUG] Contributing guidelines

Need contributing guidelines, whether for code, testing, feature requests, suggestions, pointers to usage by other projects, etc.

[BUG] Images not scaled exactly to 80x80 pixels, Stream Deck Mini will not display

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):

  • OS: Pop!_OS 20.10
  • Go version: 1.14.13 (from ASDF)

Word-wrap text

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.

[BUG] sd.UnsetDecorator doesn't work for imagefile buttons

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):

  • OS: Ubuntu 20.04
  • Go version: go version go1.14.3 linux/amd64

Additional context
Add any other context about the problem here.

Error handling on missing images

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?

Support multiple button press listeners

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.

[BUG] Can't remove a decorator

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.

Reset the USB HID comms on Open()

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.

Make a way to detach the button callback

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.

[BUG] Border decorator only works for the XL

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.