edsdk.api.commands.SudoCommand Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of edsdk4j Show documentation
Show all versions of edsdk4j Show documentation
Canon EDSDK Software Development Kit Java Wrapper
The newest version!
package edsdk.api.commands;
import edsdk.api.CanonCommand;
/**
*
* Copyright © 2014 Hansi Raber , Ananta Palani
*
* This work is free. You can redistribute it and/or modify it under the
* terms of the Do What The Fuck You Want To Public License, Version 2,
* as published by Sam Hocevar. See the COPYING file for more details.
*
* @author hansi
* @author Ananta Palani
*
*/
public class SudoCommand extends CanonCommand {
private boolean superpower = false;
public SudoCommand() {}
@Override
public void run() {
notYetFinished();
superpower = true;
}
/**
* Call this to wait until you have power over the camera
*/
public void begin() {
try {
while ( !superpower ) {
Thread.sleep( 10 );
}
}
catch ( final InterruptedException e ) {
e.printStackTrace();
}
}
/**
* Call this when you're done
*/
public void end() {
setResult( true );
}
}