#include #include #include "mini_ssc.h" char *usage = "USAGE:\n" " autofocus 73\n" " puts focus servo at closest\n" " test 238\n" " puts servo at infinity\n" " beyond 73 to 238 truncated to 73 to 238\n"; int main(int argc,char **argv) { int port, baudrate, servo, min, max, delay, step; char *s; int i,n,z; int x_in, y_in; int x_out, y_out; // defaults port = 0; baudrate = 2400; // get parameter values if (argc==2){ x_in = atoi(argv[1]); } else { fprintf(stderr,"%s",usage); exit(-1); } if (x_in >238){ x_in = 238; } if (x_in < 73){ x_in = 73; } // connect to the ssc if(!ssc_open(port,baudrate)){ // enter infinite loop that translates pairs of screen coordinates // to pairs of telepointer coodinates. ssc_move( 0, x_in ); fprintf(stderr,"%d\n", x_in); } }