Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scriw b #13

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
14 changes: 14 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Debug (Launch) - Current File",
"request": "launch",
"mainClass": "${file}"
}
]
}
6 changes: 6 additions & 0 deletions .wpilib/wpilib_preferences.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"currentLanguage": "java",
"enableCppIntellisense": false,
"projectYear": "none",
"teamNumber": 342
}
33 changes: 12 additions & 21 deletions src/main/java/frc/robot/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
import frc.robot.commands.ToggleSlowDrive;
import frc.robot.commands.WristToPosition;
import frc.robot.commands.XboxRumble;
import frc.robot.commands.ClimbCommands.DriveControl;
import frc.robot.commands.ClimbCommands.HookIn;
import frc.robot.commands.ClimbCommands.HookOut;
import frc.robot.commands.LiftToHeight.LiftHeight;
import frc.robot.commands.LiftToHeightPID.LiftPosition;
import frc.robot.commands.WristToPosition.WristPosition;
Expand Down Expand Up @@ -47,7 +44,7 @@
import frc.robot.commands.EngageOveride;


import frc.robot.commands.TurboDrive;;
import frc.robot.commands.TurboDrive;

/**
* This class is the glue that binds the controls on the physical operator
Expand Down Expand Up @@ -89,19 +86,16 @@ public class OI {
private Command xboxRumble = new XboxRumble();



private Command liftToHeightPIDLowHatch = new LiftToHeightPID(LiftPosition.HatchLowRocket);
private Command liftToTop = new LiftToTop();
private Command liftToMiddle = new LiftToMiddle();
private Command liftToLow = new LiftToBottom();
private Command driveControl = new DriveControl();
// Disabled lift to height buttons for SCRIW because of possibility of robot tipping
// private Command liftToHeightPIDLowHatch = new LiftToHeightPID(LiftPosition.HatchLowRocket);
// private Command liftToTop = new LiftToTop();
// private Command liftToMiddle = new LiftToMiddle();
// private Command liftToLow = new LiftToBottom();
private Command engageOveride = new EngageOveride();


private Command HatchRelease = new HatchRelease();
private Command hookOut = new HookOut();
private Command hookIn = new HookIn();




private Command wristToPositionCargo = new WristToPosition(WristPosition.Cargo);
Expand Down Expand Up @@ -190,7 +184,7 @@ private OI() {



xbox_drive_leftBumper.whileHeld(turboDrive);
//xbox_drive_leftBumper.whileHeld(turboDrive);
//xbox_drive_B.whileHeld(driveControl);
// xbox_drive_Y.whileHeld(hookOut);
//xbox_drive_A.whileHeld(lowerWithPneumatics);
Expand All @@ -200,9 +194,6 @@ private OI() {
// xbox_drive_X.whileHeld(RotateToAngle270);
// xbox_drive_Y.whileHeld(RotateToAngle0);

xbox_drive_startbutton.whileHeld(driveControl);
xbox_drive_backbutton.whenPressed(hookOut);




Expand All @@ -216,10 +207,10 @@ private OI() {



logitech_manipulator_A.whileHeld(liftToLow);
logitech_manipulator_B.whileHeld(liftToMiddle);
logitech_manipulator_Y.whileHeld(liftToTop);
logitech_manipulator_X.whileHeld(liftToHeightPIDLowHatch);
//logitech_manipulator_A.whileHeld(liftToLow);
//logitech_manipulator_B.whileHeld(liftToMiddle);
//logitech_manipulator_Y.whileHeld(liftToTop);
//logitech_manipulator_X.whileHeld(liftToHeightPIDLowHatch);

logitech_manipulator_leftBumper.whenPressed(toggleSlowDrive);
logitech_manipulator_rightBumper.whileHeld(HatchRelease);
Expand Down
11 changes: 3 additions & 8 deletions src/main/java/frc/robot/Robot.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import frc.robot.commands.HatchGrab;
import frc.robot.commands.PneumaticsWithCANifier;
import frc.robot.commands.LiftWithJoystick;
import frc.robot.commands.Autonomous.DriveOffPlatform;
import frc.robot.subsystems.CameraVisionSystem;
import frc.robot.subsystems.ExampleSubsystem;
import frc.robot.commands.LiftToHeight;
Expand All @@ -31,7 +30,6 @@
import frc.robot.subsystems.DriveSystem;
import edu.wpi.cscore.VideoMode.PixelFormat;
import frc.robot.commands.FistIntake;
import frc.robot.commands.ClimbCommands.WenchControl;
import com.kauailabs.navx.frc.AHRS;
import edu.wpi.first.wpilibj.SPI;

Expand All @@ -57,7 +55,7 @@ public class Robot extends TimedRobot {
private LiftSystem lift;
private DriveSystem drive;
private Command fistIntake;
private Command wenchControl;
//private Command wenchControl;
AHRS NavX;


Expand Down Expand Up @@ -102,7 +100,6 @@ public void robotInit() {
HatchGrab = new HatchGrab();
wristNow = new WristWithJoystick();
fistIntake = new FistIntake();
wenchControl = new WenchControl();
lift.SetTrueZero();

//NavX = new AHRS(SPI.Port.kMXP);
Expand Down Expand Up @@ -177,7 +174,6 @@ public void autonomousInit() {
HatchGrab.start();
wristNow.start();
fistIntake.start();
System.out.println("You mad bro?: ");
/*m_autonomousCommand = m_chooser.getSelected();


Expand Down Expand Up @@ -220,15 +216,14 @@ public void teleopInit() {
* ((DriveWithJoystick) driveNow).setArcadeDrive(arcade_chooser.getSelected());
*/
lift.resetHoldPosition();
wenchControl.start();
//wenchControl.start();
System.out.println("Starting Commands: ");
driveNow.start();
liftNow.start();
HatchGrab.start();
wristNow.start();
fistIntake.start();
wenchControl.start();
System.out.println("You mad bro?: ");
//wenchControl.start();


//HatchGrab.start();
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/frc/robot/RobotMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,24 @@ public class RobotMap {
public static final int LOGI_LEFT_B = 5;

/* Can addresses */

// Motors
public static final int DRV_LEFTLEAD = 4;
public static final int DRV_LEFTFOLLOW_1 = 5;
public static final int DRV_LEFTFOLLOW_2 = 6;
public static final int DRV_RIGHTLEAD = 1;
public static final int DRV_RIGHTFOLLOW_1 = 2;
public static final int DRV_RIGHTFOLLOW_2 = 3;


/*
public static final int DRV_LEFT_MASTER = 1;
public static final int DRV_LEFT_FOLLOW_1 = 2;
public static final int DRV_LEFT_FOLLOW_2 = 3;
public static final int DRV_RIGHT_MASTER = 4;
public static final int DRV_RIGHT_FOLLOW_1 = 5;
public static final int DRV_RIGHT_FOLLOW_2 = 6;
*/

public static final int LFT_MASTER = 7;
public static final int LFT_FOLLOW_1 = 8;
Expand Down
28 changes: 0 additions & 28 deletions src/main/java/frc/robot/commands/Autonomous/DriveOffPlatform.java

This file was deleted.

69 changes: 0 additions & 69 deletions src/main/java/frc/robot/commands/ClimbCommands/DriveControl.java

This file was deleted.

56 changes: 0 additions & 56 deletions src/main/java/frc/robot/commands/ClimbCommands/HookIn.java

This file was deleted.

Loading