-
Notifications
You must be signed in to change notification settings - Fork 253
Add camera mismatch banner to dashboard #1921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add camera mismatch banner to dashboard #1921
Conversation
Looks good, I'll test when I have a chance. |
This is all front-end code. Shouldn't we also involve the back-end, at least to log that there is a conflict? |
Yea I agree with Craig. If we could just get a log message, ideally with the camera that should be there, and the camera that is there. This should only happen once, when the camera is initially connected and mismatched. |
photon-core/src/main/java/org/photonvision/vision/processes/VisionSourceManager.java
Outdated
Show resolved
Hide resolved
I'm no longer seeing a mismatch banner at all, even if there is a mismatch present. |
Can we add some language about how matching is performed using USB port to the banner? |
This is still the case, not quite sure what changed but it's no longer working. |
photon-core/src/main/java/org/photonvision/vision/camera/PVCameraInfo.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like new logic was added to VisionSourceManager. Let's make sure we also unit test this.
// First, make sure that nickname is globally unique since we use the nickname | ||
// in NetworkTables. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unrelated diff
// FileVisionSources are a bit quirky. They aren't enumerated by the above, but | ||
// i still want my |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto for everything here
protected final HashMap<String, CameraConfiguration> disabledCameraConfigs = new HashMap<>(); | ||
|
||
// Set of cameras that where a camera mismatch error was logged | ||
protected final Set<String> warnedMismatchCameras = Set.of(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a Set really the best way to track this? Feels like we should be using a true object instead
* For file cameras, it checks the uniquePath and name. | ||
* Note: When changing this function, change the equivalent function within photon-core's VisionSourceManager class | ||
*/ | ||
export const camerasMatch = (camera1: PVCameraInfo, camera2: PVCameraInfo) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense for this logic to be dulicated now in the backend and frontend?
Description
Detects if a camera mismatch is present in any camera and displays a banner in the dashboard for better visibility to the user.
Closes #1920
Meta
Merge checklist: