kritzikratzi / edsdk4j

Canon SDK for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TakePhoto error with SL1/100D

ale770 opened this issue · comments

Hello

I'm getting an error sometimes when i take the photo. Sometimes it works fine but some other times it doesn't.

I call the shoot command, it processes the method run() and finishes it with ERR_OK.
It enters the final if on the mehtod run();
if ( err == EdsError.EDS_ERR_OK ) {
//System.out.println( "Took image, waiting for camera" );
notYetFinished();
}
But after that, nothing. It never goes into the mehtod apply().

I'm invoking the take picture method with:
final File[] photos = camera.shoot(EdsSaveTo.kEdsSaveTo_Host);

Do you have any tips on what i could check or what could be going wrong?

Sorry for my english..

Thanks.

does it help if you use the command with multiple attemts?
eg.

final File[] photos = camera.shoot(EdsSaveTo.kEdsSaveTo_Host, 5);

I don't think that will fix it.

The camera takes the photo and this line inside the while()
"err = sendCommand(EdsCameraCommand.kEdsCameraCommand_TakePicture, 0 );" returns EdsError.EDS_ERR_OK
so it will exit the "while ( shotAttempts > 0 && err != EdsError.EDS_ERR_OK)" even if the shotattempts are higher.

Plus, i call without specifiing the shotattempts, it sets it to 2147483647 already.

have you figured this out already?
don't have time to test this another few days.

if you get stuck there it's possible that it's trying to download the wrong number of photos (usually it'll download one (raw or jpeg) or two (raw and jpeg) pictures. maybe it's guessing the current camera setting wrong.

can you put debug points here https://github.com/kritzikratzi/edsdk4j/blob/master/src/edsdk/api/commands/ShootCommand.java#L103

and here https://github.com/kritzikratzi/edsdk4j/blob/master/src/edsdk/api/commands/ShootCommand.java#L170

and check the values of the count variable?

Sorry for the delay.

When it works fine the counts are:
Line 103: Count = 1
Line 170: Count = 0

And when it doesn't
Line 103: Count = 1;
Line 170: Never reaches it.

I'm starting to think its a problem with the camera.

This problem occurred with the SL1 model, now i'm using a T3i and i had no problems so far.

good to hear. i've been using the api quite a bit recently with a 600d (same as the t3i i think), and haven't had any problems.

i've renamed the bug to include your previously used model. if i ever get hold of one i'll see if i can find something that causes the problem.

thanks for your status update!

Please let us know if the latest version still has this issue and we'll reopen this issue.