package org.robockets.tshirtcannon;

import org.robockets.tshirtcannon.commands.FireCannon;

import edu.wpi.first.wpilibj.command.Subsystem;

/**
 * The thing on the top that shoots T-Shirts.
 */
public class Cannon extends Subsystem {
    public void initDefaultCommand() {
    	setDefaultCommand(new FireCannon());
    }
    public void fire() {
    	//TODO: Fire the cannon
    }
    
    /**
     * Rotate the base of the cannon.
     * @param dir Direction to rotate in. Must be 'l' (left) or 'r' (right)
     */
    public void rotateBase(char dir) {
    	if(dir == 'l') {
    		//TODO: spin left
    	}
    	else if(dir == 'r') {
    		//TODO: spin right
    	}
    	else {
    		throw new IllegalArgumentException("Direction is not left ('l') or right ('r')!");
    	}
    }
    
    /**
     * Adjust the angle of the cannon.
     * @param degrees Degrees to adjust the cannon
     * @param dir Direction to move the cannon. Must be 'u' (up) or 'd' (down)
     */
    public void adjustAngle(int degrees, char dir) {
    	if(dir == 'u') {
    		//TODO: move cannon up
    	}
    	else if(dir == 'd') {
    		//TODO: move cannon down
    	}
    	else {
    		throw new IllegalArgumentException("Direction is not up ('u') or down ('d')!");
    	}
    }
}


@@ -481,33 +481,22 @@
  be 
-'l' (
 left
-)
  or 
-'r' (
 right
-)
+.
 %0A   
@@ -527,20 +527,38 @@
 ateBase(
-char
+XAxisRelativeDirection
  dir) %7B%0A
@@ -572,19 +572,43 @@
 (dir == 
-'l'
+XAxisRelativeDirection.LEFT
 ) %7B%0A    
@@ -654,19 +654,44 @@
 (dir == 
-'r'
+XAxisRelativeDirection.RIGHT
 ) %7B%0A    
@@ -797,14 +797,8 @@
 left
- ('l')
  or 
@@ -806,15 +806,8 @@
 ight
- ('r')!
 %22);%0A
@@ -875,59 +875,8 @@
 on.%0A
-     * @param degrees Degrees to adjust the cannon%0A
     
@@ -931,30 +931,19 @@
  be 
-'u' (
 up
-)
  or 
-'d' (
 down
-)
+.
 %0A   
@@ -979,25 +979,30 @@
 gle(
-int degrees, char
+ZAxisRelativeDirection
  dir
@@ -1020,19 +1020,41 @@
 (dir == 
-'u'
+ZAxisRelativeDirection.UP
 ) %7B%0A    
@@ -1105,19 +1105,43 @@
 (dir == 
-'d'
+ZAxisRelativeDirection.DOWN
 ) %7B%0A    
@@ -1251,22 +1251,16 @@
 t up
- ('u')
  or down
  ('d
@@ -1259,14 +1259,8 @@
 down
- ('d')
 !%22);

Update Cannon subsystem methods to use new enums