allwpilib
allwpilib copied to clipboard
CameraServer: addCamera() twice with same device name should fail
Otherwise users get cryptic errors like so:
https://www.chiefdelphi.com/forums/showpost.php?p=1646981&postcount=6
A more general way of duplicating that error is by calling startAutomaticCapture twice with the same device number. I haven't tried C++/Java... but it appears to be present in Java, at least.
CameraServer.startAutomaticCapture(dev=0)
CameraServer.startAutomaticCapture(dev=0)
Perhaps add a collection of video sources, and fail if it contains the added source?
I don't get any errors using the same device and it seems to work, do we still want to throw an error if adding the same device twice?