Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified build/jars/NetworkTables.jar
Binary file not shown.
Binary file modified build/jars/WPILib.jar
Binary file not shown.
Binary file modified build/jars/cscore.jar
Binary file not shown.
Binary file modified build/org/usfirst/frc/team708/robot/OI.class
Binary file not shown.
Binary file modified build/org/usfirst/frc/team708/robot/Robot.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified dist/FRCUserProgram.jar
Binary file not shown.
7 changes: 3 additions & 4 deletions src/org/usfirst/frc/team708/robot/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
import edu.wpi.first.wpilibj.buttons.*;

import org.usfirst.frc.team708.robot.commands.drivetrain.*;
import org.usfirst.frc.team708.robot.commands.intake_ball.*;
import org.usfirst.frc.team708.robot.commands.shooter.*;
import org.usfirst.frc.team708.robot.commands.loader.*;

//import org.team708.robot.commands.intake.*;

import org.usfirst.frc.team708.robot.commands.visionProcessor.*;

import org.usfirst.frc.team708.robot.util.Gamepad;
Expand Down Expand Up @@ -89,9 +88,9 @@ public OI() {
* Driver Commands to be called by button
*/
// intakeGearIn.whileHeld(new IntakeGearIn());
// intakeBallIn.whileHeld(new IntakeBallIn());
intakeBallIn.whileHeld(new Intake_Ball_In());
// intakeGearOut.whileActive(new IntakeGearOut());
// intakeBallOut.whileActive(new IntakeBallOut());
intakeBallOut.whileActive(new Intake_Ball_Out());

// sonarOverride.whenPressed(new SonarOverride());
//
Expand Down
32 changes: 17 additions & 15 deletions src/org/usfirst/frc/team708/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,17 @@
import org.usfirst.frc.team708.robot.subsystems.Drivetrain;
import org.usfirst.frc.team708.robot.subsystems.Shooter;
import org.usfirst.frc.team708.robot.subsystems.Loader;
import org.usfirst.frc.team.708.robot.subsystems.Intake_Ball;
import org.usfirst.frc.team.708.robot.subsystems.Intake_Gear;
import org.usfirst.frc.team.708.robot.subsystems.Climber;
import org.usfirst.frc.team708.robot.subsystems.Intake_Ball;
//import org.usfirst.frc.team.708.robot.subsystems.Intake_Gear;
//import org.usfirst.frc.team.708.robot.subsystems.Climber;

import org.usfirst.frc.team708.robot.OI;

import org.usfirst.frc.team708.robot.subsystems.VisionProcessor;
import org.usfirst.frc.team708.robot.commands.drivetrain.*;
import org.usfirst.frc.team708.robot.commands.loader.*;
import org.usfirst.frc.team708.robot.commands.intake_ball.*;

import org.usfirst.frc.team708.robot.commands.autonomous.*;

//sue's comment
Expand All @@ -46,9 +48,9 @@ public class Robot extends IterativeRobot {
public static Drivetrain drivetrain;
public static Shooter shooter;
public static Loader loader;
public static Intake_Ball Intake_Ball;
public static Intake_Gear Intake_Gear;
public static Climber Climber;
public static Intake_Ball intake_ball;
// public static Intake_Gear intake_gear;
// public static Climber Climber;

public static VisionProcessor visionProcessor;

Expand Down Expand Up @@ -76,9 +78,9 @@ public void robotInit() {
drivetrain = new Drivetrain();
shooter = new Shooter();
loader = new Loader();
Intake_Gear = new Intake_Gear();
Intake_Ball = new Intake_Ball();
Climber = new Climber();
// Intake_Gear = new Intake_Gear();
intake_ball = new Intake_Ball();
// Climber = new Climber();

oi = new OI(); // Initializes the OI.
// This MUST BE LAST or a NullPointerException will be thrown
Expand Down Expand Up @@ -166,9 +168,9 @@ private void sendStatistics() {
drivetrain.sendToDashboard();
loader.sendToDashboard();
shooter.sendToDashboard();
Intake_Ball.sendToDashboard();
Intake_Gear.sendToDashboard();
Climber.sendToDashbaord();
intake_ball.sendToDashboard();
// Intake_Gear.sendToDashboard();
// Climber.sendToDashbaord();

// visionProcessor.sendToDashboard();
}
Expand All @@ -194,9 +196,9 @@ private void sendDashboardSubsystems() {
SmartDashboard.putData(shooter);
SmartDashboard.putData(loader);
SmartDashboard.putData(drivetrain);
SmartDashboard.putData(Intake_Ball);
SmartDashboard.putData(Intake_Gear);
SmartDashboard.putData(Climber);
SmartDashboard.putData(intake_ball);
//SmartDashboard.putData(Intake_Gear);
//SmartDashboard.putData(Climber);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.usfirst.frc.team708.robot.commands.intake;

public class IntakeIn {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package org.usfirst.frc.team708.robot.commands.intake_ball;

import org.usfirst.frc.team708.robot.Constants;
import org.usfirst.frc.team708.robot.Robot;

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

public class Intake_Ball_In extends Command {

public Intake_Ball_In() {

requires(Robot.intake_ball);
}

protected void initialize() {

}

protected void execute() {

Robot.intake_ball.moveMotor(Constants.INTAKE_FORWARD);
}


protected boolean isFinished() {

return(false);
}

protected void end() {

Robot.intake_ball.stop();

}

protected void interrupted() {

end();
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package org.usfirst.frc.team708.robot.commands.intake_ball;

import org.usfirst.frc.team708.robot.Constants;
import org.usfirst.frc.team708.robot.Robot;
import edu.wpi.first.wpilibj.command.Command;

public class Intake_Ball_Out extends Command {

public Intake_Ball_Out() {

requires(Robot.intake_ball);
}

protected void initialize() {

}

protected void execute() {

Robot.intake_ball.moveMotor(Constants.INTAKE_REVERSE);
}


protected boolean isFinished() {

return(false);
}

protected void end() {

Robot.intake_ball.stop();

}

protected void interrupted() {

end();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package org.usfirst.frc.team708.robot.commands.intake_ball;

import org.usfirst.frc.team708.robot.Constants;
import org.usfirst.frc.team708.robot.OI;
import org.usfirst.frc.team708.robot.Robot;
import org.usfirst.frc.team708.robot.util.Gamepad;
import edu.wpi.first.wpilibj.command.Command;


public class ManualIntake_Ball extends Command {

public ManualIntake_Ball() {
requires(Robot.loader);
}


// Called just before this Command runs the first time
protected void initialize() {

}

// Called repeatedly when this Command is scheduled to run
protected void execute() {

boolean R_Shoulderpressed = OI.operatorGamepad.getButton(Gamepad.button_R_Shoulder);
boolean AxisRightpressed = OI.operatorGamepad.getButton(Gamepad.shoulderAxisRight);

// LOADER_IN_BUTTON = Gamepad.Button_R_Shoulder;
// LOADER_OUT_BUTTON = Gamepad.shoulderAxisRight;

if (R_Shoulderpressed == true){
Robot.intake_ball.moveMotor(Constants.INTAKE_FORWARD);
}
else
if (AxisRightpressed == true){
Robot.intake_ball.moveMotor(Constants.INTAKE_REVERSE);
}
else {
Robot.intake_ball.moveMotor(Constants.INTAKE_OFF);
}

}

// Make this return true when this Command no longer needs to run execute()
protected boolean isFinished() {
return(false);
}

// Called once after isFinished returns true
protected void end() {
Robot.intake_ball.stop();
}

// Called when another command which requires one or more of the same
// subsystems are scheduled to run
protected void interrupted() {
end();
}
}
Original file line number Diff line number Diff line change
@@ -1,39 +1,48 @@
package org.usfirst.frc.team708.robot.subsystems;

import org.usfirst.frc.team708.robot.Constants;
import org.usfirst.frc.team708.robot.RobotMap;

import com.ctre.CANTalon;

//import org.usfirst.frc.team708.robot.RobotMap;
//import edu.wpi.first.wpilibj.Relay;
//import edu.wpi.first.wpilibj.Relay.Value;
//import edu.wpi.first.wpilibj.Talon;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
//import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
/**
* Subsystem that intakes balls
* @author James_Makovics
* @author Michael_Steinberg
* @author Thomas Zhao
* @author Alex Tysak
* @author Madison
* @author Nick
*/

public class Intake extends Subsystem {

/**
* Constructor
*/
public Intake() {
public class Intake_Ball extends Subsystem {

private CANTalon intakeMotor;

//I'm trying to link the right motor to the intake code here
public Intake_Ball() {

intakeMotor = new CANTalon (RobotMap.intakeMotorBall);

}

public void initDefaultCommand() {

}

//I believe this sets the speed of the motor
public void moveMotor(double speed) {

intakeMotor.set(speed);
}

//I believe this stops the motor
public void stop(){

intakeMotor.set(Constants.INTAKE_OFF);

}

/**
Expand Down