Clara Hobbs 63aa1a6cc1 Add SinkConfig.__str__ method | 7 years ago | |
---|---|---|
pdbuddy | 7 years ago | |
.gitignore | 7 years ago | |
LICENSE | 7 years ago | |
README.md | 7 years ago |
Python library for working with the PD Buddy Sink Serial Console Configuration Interface
>>> import pdbuddy
>>> pdbs = pdbuddy.Sink(list(pdbuddy.Sink.get_devices())[0])
>>> pdbs.get_cfg()
SinkConfig(status=SinkStatus.VALID, flags=SinkFlags.NONE, v=5000, i=3000)
>>> cfg = pdbs.get_cfg()
>>> cfg.v = 20000
>>> cfg.i = 2250
>>> cfg.flags |= pdbuddy.SinkFlags.GIVEBACK
>>> cfg
SinkConfig(status=SinkStatus.VALID, flags=SinkFlags.GIVEBACK, v=20000, i=2250)
>>> pdbs.set_tmpcfg(cfg)
>>> pdbs.write()
>>> pdbs.get_cfg()
SinkConfig(status=SinkStatus.VALID, flags=SinkFlags.GIVEBACK, v=20000, i=2250)