com.scottpreston.javarobot.chapter3
Class PanTilt

java.lang.Object
  extended by com.scottpreston.javarobot.chapter3.PanTilt
Direct Known Subclasses:
PanTiltSpeed

public class PanTilt
extends java.lang.Object


Field Summary
static int HORZ_NEUTRAL
           
static int HORZ_SERVO
           
static int MAX_DOWN
           
static int MAX_LEFT
           
static int MAX_RIGHT
           
static int MAX_UP
           
static int MIN_DELAY_SIZE
           
static int MIN_STEP_SIZE
           
static int VERT_NEUTRAL
           
static int VERT_SERVO
           
 
Constructor Summary
PanTilt(JSerialPort sPort)
           
 
Method Summary
 int getHorzPos()
           
 int getMoveDelay()
           
 int getSpeed()
           
 int getStepSize()
           
 int getVertPos()
           
 void horz(int pos)
           
 void horzDegree(int angle)
           
static void main(java.lang.String[] args)
           
 void moveBoth(int h, int v)
           
 void moveDown()
           
 void moveDown(int size)
           
 void moveLeft()
           
 void moveLeft(int size)
           
 void moveRight()
           
 void moveRight(int size)
           
 void moveUp()
           
 void moveUp(int size)
           
 void reset()
           
 void setHorzPos(int horzPos)
           
 void setServoTiming(int stepSize, int moveDelay)
           
 void setSpeed(int speed)
           
 void setVertPos(int vertPos)
           
 void vert(int pos)
           
 void vertDegree(int angle)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HORZ_SERVO

public static final int HORZ_SERVO
See Also:
Constant Field Values

VERT_SERVO

public static final int VERT_SERVO
See Also:
Constant Field Values

MAX_UP

public static final int MAX_UP
See Also:
Constant Field Values

MAX_DOWN

public static final int MAX_DOWN
See Also:
Constant Field Values

MAX_RIGHT

public static final int MAX_RIGHT
See Also:
Constant Field Values

MAX_LEFT

public static final int MAX_LEFT
See Also:
Constant Field Values

VERT_NEUTRAL

public static final int VERT_NEUTRAL
See Also:
Constant Field Values

HORZ_NEUTRAL

public static final int HORZ_NEUTRAL
See Also:
Constant Field Values

MIN_STEP_SIZE

public static final int MIN_STEP_SIZE
See Also:
Constant Field Values

MIN_DELAY_SIZE

public static final int MIN_DELAY_SIZE
See Also:
Constant Field Values
Constructor Detail

PanTilt

public PanTilt(JSerialPort sPort)
        throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

moveBoth

public void moveBoth(int h,
                     int v)
              throws java.lang.Exception
Throws:
java.lang.Exception

horz

public void horz(int pos)
          throws java.lang.Exception
Throws:
java.lang.Exception

horzDegree

public void horzDegree(int angle)
                throws java.lang.Exception
Throws:
java.lang.Exception

vert

public void vert(int pos)
          throws java.lang.Exception
Throws:
java.lang.Exception

vertDegree

public void vertDegree(int angle)
                throws java.lang.Exception
Throws:
java.lang.Exception

reset

public void reset()
           throws java.lang.Exception
Throws:
java.lang.Exception

moveRight

public void moveRight(int size)
               throws java.lang.Exception
Throws:
java.lang.Exception

moveRight

public void moveRight()
               throws java.lang.Exception
Throws:
java.lang.Exception

moveLeft

public void moveLeft(int size)
              throws java.lang.Exception
Throws:
java.lang.Exception

moveLeft

public void moveLeft()
              throws java.lang.Exception
Throws:
java.lang.Exception

moveUp

public void moveUp(int size)
            throws java.lang.Exception
Throws:
java.lang.Exception

moveUp

public void moveUp()
            throws java.lang.Exception
Throws:
java.lang.Exception

moveDown

public void moveDown(int size)
              throws java.lang.Exception
Throws:
java.lang.Exception

moveDown

public void moveDown()
              throws java.lang.Exception
Throws:
java.lang.Exception

getHorzPos

public int getHorzPos()

setHorzPos

public void setHorzPos(int horzPos)

getVertPos

public int getVertPos()

setVertPos

public void setVertPos(int vertPos)

getSpeed

public int getSpeed()

setSpeed

public void setSpeed(int speed)

setServoTiming

public void setServoTiming(int stepSize,
                           int moveDelay)
                    throws java.lang.Exception
Throws:
java.lang.Exception

getMoveDelay

public int getMoveDelay()

getStepSize

public int getStepSize()

main

public static void main(java.lang.String[] args)