diff --git a/OI.cpp b/OI.cpp index dc49b63..545da24 100644 --- a/OI.cpp +++ b/OI.cpp @@ -18,12 +18,16 @@ OI::OI() { JoystickButton *right4=new JoystickButton(rightStick, 4); JoystickButton *right5=new JoystickButton(rightStick, 5); JoystickButton *right6=new JoystickButton(rightStick, 6); + JoystickButton *right7=new JoystickButton(rightStick, 7); + JoystickButton *right8=new JoystickButton(rightStick, 8); right1->WhenPressed(new OpenCollector()); right2->WhenPressed(new CloseCollector()); right3->WhenPressed(new CollectTote()); right4->WhenPressed(new ReleaseTote()); right5->WhenPressed(new StartCompressing()); right6->WhenPressed(new StopCompressing()); + right7->WhenPressed(new Raise()); + right8->WhenPressed(new Lower()); } Joystick* OI::GetRightStick(){ return rightStick; diff --git a/RobotMap.h b/RobotMap.h index 294feab..bd596cf 100644 --- a/RobotMap.h +++ b/RobotMap.h @@ -4,22 +4,22 @@ #include "WPILib.h" // Elevator -#define ELEVATOR_CAN 0 +#define ELEVATOR_CAN 1 // Drivetrain -#define DRIVE_FRONT_LEFT_CAN 41 -#define DRIVE_BACK_LEFT_CAN 43 -#define DRIVE_FRONT_RIGHT_CAN 40 -#define DRIVE_BACK_RIGHT_CAN 42 +#define DRIVE_FRONT_LEFT_CAN 2 +#define DRIVE_BACK_LEFT_CAN 3 +#define DRIVE_FRONT_RIGHT_CAN 4 +#define DRIVE_BACK_RIGHT_CAN 5 // Collector -#define COLLECTOR_WINDOW_LEFT_CAN 50 -#define COLLECTOR_WINDOW_RIGHT_CAN 51 -#define COLLECTOR_LEFT_CAN 52 -#define COLLECTOR_RIGHT_CAN 53 +#define COLLECTOR_WINDOW_LEFT_CAN 6 +#define COLLECTOR_WINDOW_RIGHT_CAN 7 +#define COLLECTOR_LEFT_CAN 8 +#define COLLECTOR_RIGHT_CAN 9 #define COLLECTOR_BOXSWITCH_DIO 9 // Compressor -#define COMPRESSOR_CAN 31 +#define COMPRESSOR_CAN 10 #endif diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 0000000..a386c8a --- /dev/null +++ b/TODO.txt @@ -0,0 +1,4 @@ +Release for all buttons does not work +raise is pushed, elevator raises, lower is pushed, elevator lowers, raise is pushed, no effect +lower is pushed, elevator lowers, raise is pushed, no effect +dos compressor on compressor start or stop