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

Commit

Permalink
I did intake
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierCraw committed Nov 21, 2024
1 parent 0ab63e0 commit dd9285b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/team766/robot/rookie_bot/OI.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ public void run(final Context context) {

Robot.drive.setArcadeDrivePower(-1 * joystick0.getAxis(1), joystick0.getAxis(3));
context.waitFor(() -> RobotProvider.instance.hasNewDriverStationData());
if (joystick0.getButtonPressed(1)) {
if (joystick0.getButtonPressed(4)) {
context.startAsync(new PIDElevator(true));

}
if (joystick0.getButtonPressed(2)) {
context.startAsync(new PIDElevator(false));

}
if (joystick0.getButtonPressed)
}
}
}
22 changes: 22 additions & 0 deletions src/main/java/com/team766/robot/rookie_bot/mechanisms/intake.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package com.team766.robot.rookie_bot.mechanisms;

import com.team766.framework.Mechanism;
import com.team766.hal.MotorController;
import com.team766.hal.RobotProvider;

public class intake extends Mechanism {
private MotorController leftMotor;
private MotorController rightMotor;

public intake() {
leftMotor = RobotProvider.instance.getMotor("intake.leftMotor");
rightMotor = RobotProvider.instance.getMotor("intake.rightMotor");
}

public void setintakePower(double leftPower, double rightPower) {
checkContextOwnership();
leftMotor.set(leftPower);
rightMotor.set(rightPower);
}

}

0 comments on commit dd9285b

Please sign in to comment.