mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-02 02:51:40 +00:00
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:
@@ -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!",
|
||||
|
||||
Reference in New Issue
Block a user