Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Did work
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier committed Nov 23, 2024
1 parent 649b719 commit 0801aea
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ public class AutonomousModes {
new AutonomousMode("DriveStraight", () -> new DriveStraight()),
new AutonomousMode("DriveinaSquare", () -> new DriveinaSquare()),
};

}
2 changes: 1 addition & 1 deletion src/main/java/com/team766/robot/rookie_bot/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void run(final Context context) {

// Add driver controls here - make sure to take/release ownership
// of mechanisms when appropriate.
Robot.drive.setArcadeDrivePower(-1 * joystick0.getAxis(1), joystick0.getAxis(3));
Robot.drive.setArcadeDrivePower(-0.5 * joystick0.getAxis(1), joystick0.getAxis(4));
log("Elevator height: " + Robot.elevator.getElevatorDistance());
context.waitFor(() -> RobotProvider.instance.hasNewDriverStationData());
if (joystick0.getButtonPressed(4)) {
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/com/team766/robot/rookie_bot/procedures/Auton.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.team766.robot.rookie_bot.procedures;

import com.team766.framework.Context;
import com.team766.framework.Procedure;
import com.team766.robot.rookie_bot.Robot;

public class Auton extends Procedure{
public void run(final Context context) {
Robot.intake.setintakePower(0.3, 0.75);
context.takeOwnership(Robot.drive);
Robot.drive.setDrivePower(0.5, 0.5);
context.waitForSeconds(2);
Robot.drive.setDrivePower(0, 0);
context.waitForSeconds(2.5);
Robot.drive.setDrivePower(0.25, -0.25);
context.waitForSeconds(0.90);
Robot.drive.setDrivePower(0, 0);
Robot.drive.setDrivePower(0.25, -0.25);
context.waitForSeconds(0.90);
Robot.drive.setDrivePower(0, 0);
context.takeOwnership(Robot.drive);
Robot.drive.setDrivePower(0.5, 0.5);
context.waitForSeconds(2);
Robot.drive.setDrivePower(0, 0);
}
}

0 comments on commit 0801aea

Please sign in to comment.