mirror of
https://github.com/TimeCrafters/FTC_2022
synced 2025-12-15 20:12:35 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
package org.timecrafters.testing.states;
|
||||
package org.timecrafters.testing.engine;
|
||||
|
||||
import com.qualcomm.hardware.bosch.BNO055IMU;
|
||||
import com.qualcomm.robotcore.hardware.CRServo;
|
||||
@@ -67,7 +67,6 @@ public class PrototypeTeleOPState extends CyberarmState {
|
||||
Y = engine.gamepad1.y;
|
||||
UpDPad = engine.gamepad1.dpad_up;
|
||||
|
||||
|
||||
//drive speed toggle
|
||||
//
|
||||
// boolean b = engine.gamepad1.b;
|
||||
@@ -104,18 +103,9 @@ public class PrototypeTeleOPState extends CyberarmState {
|
||||
// robot.frontRightDrive.setPower(-frontRightPower * speed);
|
||||
// robot.backRightDrive.setPower(backRightPower * speed);
|
||||
|
||||
|
||||
// if (engine.gamepad2.y) {
|
||||
//
|
||||
// robot.collectorLeft.setPower(0);
|
||||
// robot.collectorRight.setPower(0);
|
||||
if (engine.gamepad2.dpad_up) {
|
||||
robot.collectorLeft.setPower(1);
|
||||
}
|
||||
|
||||
if (engine.gamepad1.right_trigger > 0) {
|
||||
drivePower = engine.gamepad1.right_trigger;
|
||||
robot.backLeftDrive.setPower(drivePower);
|
||||
robot.backLeftDrive.setPower(0.1);
|
||||
robot.backRightDrive.setPower(drivePower);
|
||||
robot.frontLeftDrive.setPower(drivePower);
|
||||
robot.frontRightDrive.setPower(drivePower);
|
||||
@@ -123,7 +113,7 @@ public class PrototypeTeleOPState extends CyberarmState {
|
||||
|
||||
if (engine.gamepad1.left_trigger > 0) {
|
||||
drivePower = engine.gamepad1.left_trigger;
|
||||
robot.backLeftDrive.setPower(-drivePower);
|
||||
robot.backLeftDrive.setPower(-0.1);
|
||||
robot.backRightDrive.setPower(-drivePower);
|
||||
robot.frontLeftDrive.setPower(-drivePower);
|
||||
robot.frontRightDrive.setPower(-drivePower);
|
||||
@@ -262,6 +252,7 @@ public class PrototypeTeleOPState extends CyberarmState {
|
||||
robot.LowRiserLeft.setPosition(robot.LowRiserLeft.getPosition() + 0.05);
|
||||
robot.LowRiserRight.setPosition(robot.LowRiserRight.getPosition() + 0.05);
|
||||
}
|
||||
}
|
||||
}//end of y
|
||||
|
||||
if (engine.gamepad2.a) {
|
||||
@@ -404,10 +395,10 @@ public class PrototypeTeleOPState extends CyberarmState {
|
||||
//
|
||||
// }
|
||||
//
|
||||
//// if (engine.gamepad2.start){
|
||||
////
|
||||
//// if (System.currentTimeMillis() - lastStepTime >= 150) {
|
||||
// lastStepTime = System.currentTimeMillis();
|
||||
if (engine.gamepad2.start) {
|
||||
|
||||
if (System.currentTimeMillis() - lastStepTime >= 150) {
|
||||
lastStepTime = System.currentTimeMillis();
|
||||
|
||||
switch (CyclingArmUpAndDown) {
|
||||
|
||||
@@ -455,8 +446,8 @@ public class PrototypeTeleOPState extends CyberarmState {
|
||||
break;
|
||||
|
||||
} // end of switch
|
||||
// end of time if statement
|
||||
// end of start button press
|
||||
}// end of time if statement
|
||||
}// end of start button press
|
||||
|
||||
// if (engine.gamepad2.left_stick_y > 0.1) {
|
||||
// robot.HighRiserLeft.setPosition(0.5);
|
||||
@@ -683,4 +674,3 @@ public class PrototypeTeleOPState extends CyberarmState {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user