diff --git a/examples/monitor_control.py b/examples/monitor_control.py index c22c9fb4..cfd46ee6 100644 --- a/examples/monitor_control.py +++ b/examples/monitor_control.py @@ -131,12 +131,15 @@ # you can ask to be notified. # this represents the complete current state of the driver # -# DriverClient.receive(Callable[list[Monitor], None]) +# DriverClient.receive(Optional[Callable[list[Monitor], None]]) client.receive(lambda d: print(d)) # one way to use this might be to auto update your driver instance def set_monitors(data): client.monitors = data +# calling it on a new callback will cancel the old one and set the new one client.receive(set_monitors) +# calling it with no args will cancel the current receiver +client.receive() # gets latest states from driver #