-
Notifications
You must be signed in to change notification settings - Fork 196
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
Convert to user selected camera matching #1556
base: master
Are you sure you want to change the base?
Conversation
if (getClass() != obj.getClass()) return false; | ||
PVUsbCameraInfo other = (PVUsbCameraInfo) obj; | ||
|
||
// Windows device number is not significant. See |
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.
This is kinda-sorta true on Linux, too. /dev/videoN isn't consistent across reboots or hot-plugs.
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.
This was just copy pasted over from old code, ill look more into it.
List<CameraInfo> devices = filterAllowedDevices(getConnectedCameras(), Platform.getCurrentPlatform()); | ||
|
||
List<String> infoNames = cameraInfoMap.values().stream() | ||
.map(CameraInfo::name) |
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 name
a unique identifier here?
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.
This is actually the area I was struggling with, how do I check what devices are new only by using the data accessible in a camera configuration? The reason it needs to be out of a camera configuration is due to how the loaded configs are passed in and I have to fill their uniqueName slots without actually ever polling the hardware.
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.
Maybe we just lock down by USB port? So if the USB port of this device is already in use? Or what am I forgetting
&& !newCam.getSettables().videoModes.isEmpty()) { | ||
cameraSources.add(newCam); | ||
} | ||
if (configuration.cameraType == CameraType.ZeroCopyPicam && is_pi) { |
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.
can cameraType ever be picamera, but is_pi be false?
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.
I'm unsure, this was just moved old code
private String ignoredCamerasRegex = ""; | ||
|
||
private final AtomicBoolean configsLoaded = new AtomicBoolean(false); |
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.
What happens on first boot if no cameras are plugged in? Should we special case always matching the cameras that are connected at first boot, or the first camera ever plugged in?
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.
It should just load no configs right? So the user has to select the cameras. I could see an argument for first set of cameras ever detected but i feel like thats not super needed and is just adding edge cases for us to test. Maybe in the ui if theres no configs after it fetches it moves to the camera selection tab?
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.
That sounds reasonable to me. or a modal, or big flashing light telling people to take action. Just want to make "why can't i see any cameras???!!! they're plugged in????" something that's intuitive for users to fix.
|
||
const needsCamerasConfigured = computed<boolean>(() => { | ||
const ret = useCameraSettingsStore().cameras.length === 0 || useCameraSettingsStore().cameras[0] === PlaceholderCameraSettings; | ||
console.log(ret); |
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.
cant put console.log in computed, just put the val as an element in the page and look at that.
No description provided.