/*   @(#) $Header: port_assignments.h  abrown Exp $
 * Author:
 *	"Allen Brown" http://brown.armoredpenguin.com/~abrown/contact.html
 * Description:
 *   Assign ports to be used for the project.
 *   Thou shalt not use any port unless it has been declared here.
 */
#ifndef PORT_ASSIGNMENTS_H
  #define PORT_ASSIGNMENTS_H

  // --------- Operator Interface ------------
  // Defines are in <value>,<value> format since
  // the GetOIDInput and GetOIAInput functions takes
  // two inputs
  // Drive joysticks should go to port 2 and 3 (or port 1 and 4)
  // to prevent interference with voodoo dig inputs
  
  // OI digital ports:
  #define tank_button		2, 1 	// left drive joystick trigger
  #define reverse_button	2, 2 	// left drive joystick top
  #define shift_button		1, 1 	// right drive joystick trigger
  #define joy_right_port_top	2, 2 	// 
  #define voodoo_trig		4, 5 	//conflicts with complement port
  #define voodoo_left_lim_sw	4, 7 	//conflicts with complement port
  #define voodoo_right_lim_sw	4, 8 	//conflicts with complement port
  #define voodoo_joy_sw		4, 1	//
  #define voodoo_console_sw2	4, 2
  #define voodoo_console_sw3	4, 3
  #define voodoo_console_sw4	4, 4
  #define joy_arm_port_trig	1, 2
  #define joy_arm_port_top	3, 2
  #define trans_switch 		1, 3 	//not sure about the three, it need to be whatever 3
  // OI analog ports:
  #define joy_left_port_x	1, 1
  #define joy_left_port_y	1, 2
  #define joy_left_port_wheel	1, 3
  #define joy_right_port_x	2, 1
  #define joy_right_port_y	2, 2
  #define joy_right_port_wheel	2, 3 	//
  #define voodoo_port_y		4, 2
  #define claw			3, 1
  #define arm			3, 2	//arm joystick y axis

  // --------- FRC - Robot Controller ------------
  // digital i/o ports:
#ifdef competitionbot
  #define left_post_encoder_ports	1,7
  #define right_post_encoder_ports	2,8
  #define left_pre_encoder_ports	3,9
  #define right_pre_encoder_ports	4,10
#endif
  #define auto_sw3			6
#ifdef kitbot
  #define left_encoder_ports		1,7
  #define right_encoder_ports		2,8
#endif
  #define pneumatic_sensor		5
  #define arm_limit_up 11
  #define arm_limit_down 12
  #define claw_limit_open 13
  #define claw_limit_close 14
  #define IR1_port 15
  #define IR2_port 16
  #define IR3_port 17
  #define IR4_port 18
  //#define pressure_sensor1
  //#define robot_pos_1 GetDigitalInput(5);
  //#define robot_pos_2 GetDigitalInput(6);
  //#define robot_pos_3 GetDigitalInput(7);
  // relay ports:
  #define partial_deploy		1
  #define left_deploy			2
  #define right_deploy			3
  #define arm_relay			5
  #define pneumatic_relay		8

  // analog ports:
  #define arm_sensor			1
  #define auto_sw2_0_port		2
  // pwm ports:
  #define left_motor_a_pwm		1
  #define right_motor_a_pwm		2
  #define left_motor_b_pwm		10
  #define right_motor_b_pwm		4
  #define arm_motor_a_pwm		5
  #define claw_motor_pwm		6
  #define arm_motor_b_pwm		7
  #define ir_servo_1			11
  #define ir_servo_2			12
#endif
/*
 * $Log: port_assignments.h,v $
 *
 */

