Enhance discover_limelights to optionally return device names and added get_ip_by_name function to Library #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change allows users to get a name for the limelights discovered vs just a list of ip's which helps users using multiple cameras.
here is an example snippet of the new behavior of utilizing the discovered limelights function which is different from the example
You now need to specify you are looking for the IP of the limelight of the index of 0. I added another robust method to getting ip's however with the get_ip_by_name function this code snippet now looks like this.
if return_names is false
This allows users that use multiple limelights to not have to worry about order of discovery or if they disconnect a camera before startup the ip will be found if it's automatic vs static.
Setting the return_names parameter to false results in identical behavior to the previous release of LimelightLib-Python just you still need to add the ['ip] specification if looking for an ip on discovered limelights.