Allow file uploads of any size and better report active cameras in PhotonCamera error print (#1298)

Previously reported itself which was confusing. New print:

```
Error at org.photonvision.PhotonCamera.verifyVersion(PhotonCamera.java:378): Found the following PhotonVision cameras active on NetworkTables:
 ==> HD_Pro_Webcam_C920
 ==> Arducam_OV9281_USB_Camera
```
This commit is contained in:
Matt
2024-05-10 14:58:18 -04:00
committed by GitHub
parent 1708376df8
commit 713fad6f6b
6 changed files with 76 additions and 27 deletions

View File

@@ -146,6 +146,16 @@ class PhotonCamera:
cameraNames = (
self._cameraTable.getInstance().getTable(self._tableName).getSubTables()
)
# Look for only cameras with rawBytes entry that exists
cameraNames = list(
filter(
lambda it: self._cameraTable.getSubTable(it)
.getEntry("rawBytes")
.exists(),
cameraNames,
)
)
if len(cameraNames) == 0:
wpilib.reportError(
"Could not find any PhotonVision coprocessors on NetworkTables. Double check that PhotonVision is running, and that your camera is connected!",