mirror of
https://github.com/onyx-and-iris/vban-cmd-python.git
synced 2025-01-18 10:30:48 +00:00
Connection section added to README.
CHANGELOG updated to reflect changes.
This commit is contained in:
parent
ee3a871d23
commit
1833b28c8d
44
CHANGELOG.md
44
CHANGELOG.md
@ -11,6 +11,50 @@ Before any major/minor/patch bump all unit tests will be run to verify they pass
|
||||
|
||||
- [x]
|
||||
|
||||
## [1.8.0]
|
||||
|
||||
### Added
|
||||
|
||||
- Connection section to README.
|
||||
|
||||
### Changed
|
||||
|
||||
- now using clear_dirty() when sync enabled.
|
||||
|
||||
### Fixed
|
||||
|
||||
- bug in set_rt() where multiple commands sent in single request packet.
|
||||
- bug in apply where index was sent twice.
|
||||
|
||||
## [1.7.0]
|
||||
|
||||
### Added
|
||||
|
||||
- ability to read conn info from vban.toml config
|
||||
|
||||
### Changed
|
||||
|
||||
- assume a vban.toml in examples. README's modified.
|
||||
|
||||
## [1.6.0] - 2022-10-06
|
||||
|
||||
### Added
|
||||
|
||||
- fadeto(), fadeby() methods added to strip/bus classes.
|
||||
- OBS example added.
|
||||
|
||||
### Changed
|
||||
|
||||
- Event class add/remove now accept iterables.
|
||||
- property setters added to Event class.
|
||||
- ldirty logic moved into VbanRtPacket class.
|
||||
- in util, threshold a level is considered dirty moved to 7200 (-72.0)
|
||||
- now print bus levels in observer example.
|
||||
|
||||
### Fixed
|
||||
|
||||
- initialize comps in updater thread. fixes bug when switching to a kind before any level updates
|
||||
|
||||
## [1.5.0] - 2022-09-28
|
||||
|
||||
### Changed
|
||||
|
34
README.md
34
README.md
@ -29,20 +29,31 @@ For an outline of past/future changes refer to: [CHANGELOG](CHANGELOG.md)
|
||||
|
||||
## Installation
|
||||
|
||||
### `Pip`
|
||||
|
||||
Install vban-cmd package from your console
|
||||
|
||||
`pip install vban-cmd`
|
||||
|
||||
## `Use`
|
||||
|
||||
#### Connection
|
||||
|
||||
Load VBAN connection info from toml config. A valid `vban.toml` might look like this:
|
||||
|
||||
```toml
|
||||
[connection]
|
||||
ip = "gamepc.local"
|
||||
port = 6980
|
||||
streamname = "Command1"
|
||||
```
|
||||
|
||||
It should be placed next to your `__main__.py` file.
|
||||
|
||||
Alternatively you may pass `ip`, `port`, `streamname` as keyword arguments.
|
||||
|
||||
#### `__main__.py`
|
||||
|
||||
Simplest use case, use a context manager to request a VbanCmd class of a kind.
|
||||
|
||||
Login and logout are handled for you in this scenario.
|
||||
|
||||
#### `__main__.py`
|
||||
|
||||
```python
|
||||
import vban_cmd
|
||||
|
||||
@ -59,17 +70,17 @@ class ManyThings:
|
||||
)
|
||||
|
||||
def other_things(self):
|
||||
self.vban.bus[3].gain = -6.3
|
||||
self.vban.bus[4].eq = True
|
||||
info = (
|
||||
f"bus 3 gain has been set to {self.vban.bus[3].gain}",
|
||||
f"bus 4 eq has been set to {self.vban.bus[4].eq}",
|
||||
)
|
||||
self.vban.bus[3].gain = -6.3
|
||||
self.vban.bus[4].eq = True
|
||||
print("\n".join(info))
|
||||
|
||||
|
||||
def main():
|
||||
with vban_cmd.api(kind_id, **opts) as vban:
|
||||
with vban_cmd.api(kind_id, ip="gamepc.local", port=6980, streamname="Command1") as vban:
|
||||
do = ManyThings(vban)
|
||||
do.things()
|
||||
do.other_things()
|
||||
@ -85,11 +96,6 @@ def main():
|
||||
|
||||
if __name__ == "__main__":
|
||||
kind_id = "banana"
|
||||
opts = {
|
||||
"ip": "<ip address>",
|
||||
"streamname": "Command1",
|
||||
"port": 6980,
|
||||
}
|
||||
|
||||
main()
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user