pimoroni / plasma

Plasma LED driver, FX Sequencer and plugins
MIT License
17 stars 8 forks source link

plasmactl help lists --fps, but command doesn't exist (anymore?) #15

Open gomisensei opened 1 year ago

Gadgetoid commented 1 year ago

It's possible I never got 'round to implementing it in plasmactl,

Looks like the argument is supported: https://github.com/pimoroni/plasma/blob/7857c44255285aac061a9064dd033fd63bbbda29/daemon/usr/bin/plasmactl#LL39C76-L39C76

And the daemon supports the setting: https://github.com/pimoroni/plasma/blob/7857c44255285aac061a9064dd033fd63bbbda29/daemon/usr/bin/plasma#L115

So adding the following to plasmactl might work:

    if args.fps:
        print(f"Setting FPS to {args.fps}")
        with open_fifo(FIFO) as fifo:
            fifo.write(f"fps {args.fps}\n".encode("utf-8"))
            fifo.flush()
        sys.exit(0)