Added command group to grab ball

Also added control mode in wrist to change to grab ball control mode
This commit is contained in:
mayabartels
2019-01-28 16:35:32 -08:00
parent f6cd6accec
commit 4d9b855342
2 changed files with 36 additions and 1 deletions
@@ -0,0 +1,35 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) 2018 FIRST. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package org.usfirst.frc4388.robot.commands;
import edu.wpi.first.wpilibj.command.CommandGroup;
public class GrabBallOutOfRobot extends CommandGroup {
/**
* Add your docs here.
*/
public GrabBallOutOfRobot()
{
// Add Commands here:
// e.g. addSequential(new Command1());
// addSequential(new Command2());
// these will run in order.
// To run multiple commands at the same time,
// use addParallel()
// e.g. addParallel(new Command1());
// addSequential(new Command2());
// Command1 and Command2 will run in parallel.
// A command group will require all of the subsystems that each member
// would require.
// e.g. if Command1 requires chassis, and Command2 requires arm,
// a CommandGroup containing them would require both the chassis and the
// arm.
}
}
@@ -32,7 +32,7 @@ import com.ctre.phoenix.motorcontrol.ControlMode;
public class Wrist extends Subsystem
{
//Control Mode Array
public static enum WristControlMode {PID, JOYSTICK_MANUAL};
public static enum WristControlMode {PID, JOYSTICK_MANUAL, GRAB_BALL};
//Motor Controllers
private ArrayList<CANTalonEncoder> motorControllers = new ArrayList<CANTalonEncoder>();