We are doing a multithreaded application. I'm at home right now so I don't have any hand on code examples but for how to program using threads in java look into Thread class and the Runnable interface. Basically a threaded camera/targer would look something like this
Code:
public class Targeter implements Runnable{
Arguments
Arguments
Arguments
Arguments
public void run(){
while(true){
aimTheTarger();
}
public void start(){
Thread p = new Thread(this,"This is a Thread");
p.start();
}
public class Vision implements Runnable{
Arguments
Arguments
Arguments
Arguments
public void run(){
while(true){
TakeAPicture();
}
public void start(){
Thread p = new Thread(this,"This is a Thread");
p.start();
}
Also look into the synchronized keyword which is useful for making sure threads don't interrupt each other.
Good luck
~Kenneth
Team #2212 The Spikes