Skip to content
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

Take picture throws "TAKE_PICTURE_CARD_NG" #22

Open
tom5025 opened this issue Jul 17, 2024 · 1 comment
Open

Take picture throws "TAKE_PICTURE_CARD_NG" #22

tom5025 opened this issue Jul 17, 2024 · 1 comment

Comments

@tom5025
Copy link

tom5025 commented Jul 17, 2024

Hey, i'm having issues with taking a picture with a canon 2000D, where if i call takepicture, it throws TAKE_PICTURE_CARD_NG but there is no card in the camera.
Did you ever experience this kind of issue ?
This is what i'm doing :

// ... connect to the camera, keeping it alive...
camera.setProperties({
[CameraProperty.ID.SaveTo]: Option.SaveTo.Host,
[CameraProperty.ID.ImageQuality]: ImageQuality.ID.Small2JPEGFine,
});
camera.takePicture();
watchCameras(500); // this should be called one time because there is an infinite loop in it

I checked the C++ code of your lib and when we set SaveTo : Host, it actually sets the capacity of the host to be a large number. But it does not set the output to be PC ? should we do that too ?

Thank you for your help

@wildangunawan
Copy link

image

I think it's better to put camera.takePicture() in a different function and trigger it differently (thru a button or something) to make sure it doesn't have a race condition with camera.setProperties() call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants