Skip to content

Commit e437a99

Browse files
SAvepoint 11/11; code edited from comp too
1 parent 386fd21 commit e437a99

File tree

7 files changed

+58
-441
lines changed

7 files changed

+58
-441
lines changed

TeamCode2029/build.gradle

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,25 @@
1111

1212
// Custom definitions may go here
1313

14+
15+
buildscript {
16+
repositories {
17+
mavenCentral()
18+
maven {
19+
url = 'https://www.matthewo.tech/maven/'
20+
}
21+
}
22+
dependencies {
23+
classpath 'org.team11260:fast-load-plugin:0.1.2'
24+
25+
}
26+
}
27+
1428
// Include common definitions from above.
1529
apply from: '../build.common.gradle'
1630
apply from: '../build.dependencies.gradle'
31+
apply plugin: 'org.team11260.fast-load-plugin'
32+
1733

1834
android {
1935
namespace = 'com.n0tasha4k.ftc.twentyfive'
@@ -23,8 +39,17 @@ android {
2339
}
2440
}
2541

42+
43+
repositories {
44+
maven {
45+
url = 'https://www.matthewo.tech/maven/'
46+
}
47+
}
48+
2649
dependencies {
2750
implementation project(':FtcRobotController')
2851
implementation 'com.acmerobotics.dashboard:dashboard:0.5.0'
52+
implementation 'org.team11260:fast-load:0.1.4-beta1'
2953

30-
}
54+
55+
}

TeamCode2029/src/main/java/com/n0tasha4k/ftc/twentyfive/AutoDecodeChallengeModular.java

Lines changed: 0 additions & 202 deletions
This file was deleted.

TeamCode2029/src/main/java/com/n0tasha4k/ftc/twentyfive/AutoPIDTest.java

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
public class AutoPIDTest extends LinearOpMode {
1515

1616
// ===== FTC Dashboard Tunables =====
17-
public static double KP = 0.0008;
18-
public static double KI = 0.0;
19-
public static double KD = 0.00005;
17+
public static double KP = 0.001;
18+
public static double KI = 0.0002;
19+
public static double KD = 0.000055;
2020
public static double TURN_KP = 0.01; // simpler proportional turn
2121
public static double ALLOWABLE_ERROR_TICKS = 30;
22-
public static double TICKS_PER_REV = 537.7; // GoBilda 312 RPM
22+
public static double TICKS_PER_REV = 537.7; // 312 RPM
2323
public static double WHEEL_DIAMETER_INCHES = 3.77953;
2424
public static double TRACK_WIDTH_INCHES = 13; // distance between wheels
25-
public static double RIGHT_CORRECTION = 0.7828723194; // tune if robot drifts right
25+
public static double RIGHT_CORRECTION = .9175; // tune if robot drifts right
2626

2727
private static final double TICKS_PER_INCH =
2828
TICKS_PER_REV / (Math.PI * WHEEL_DIAMETER_INCHES);
@@ -50,17 +50,7 @@ public void runOpMode() {
5050
waitForStart();
5151
if (isStopRequested()) return;
5252

53-
// ===== Autonomous Sequence =====
54-
for (int i = 0; i < 9101 && opModeIsActive(); i++) {
55-
driveForward(24); // forward ~~ inches
56-
sleep(250);
57-
driveBackward(24); // backward ~~` inches
58-
sleep(250);
59-
}
60-
61-
turnDegrees(90);
62-
sleep(500);
63-
turnDegrees(-90);
53+
driveForward(24);
6454

6555
stopMotors();
6656
}

TeamCode2029/src/main/java/com/n0tasha4k/ftc/twentyfive/BADdieAUTONOUMOUS.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import com.qualcomm.robotcore.hardware.DcMotorEx;
88
import com.qualcomm.robotcore.hardware.Servo;
99

10-
@Autonomous(name = "BADdieAUTONOMOUS (Blocks to Java)")
10+
@Autonomous(name = "*GREAT*BADdieAUTONOMOUS (Blocks to Java)")
1111
public class BADdieAUTONOUMOUS extends LinearOpMode {
1212

1313
private DcMotor left;
@@ -37,14 +37,14 @@ public void runOpMode() {
3737
while (opModeIsActive()) {
3838
left.setPower(-1);
3939
right.setPower((1 / 1.2773475));
40-
sleep(2000);
40+
sleep(1425);
4141
left.setPower(0);
4242
right.setPower(0);
43-
shooter.setVelocity(1800);
43+
shooter.setVelocity(1875);
4444

45-
if (shooter.getVelocity() > 1650) {
45+
if (shooter.getVelocity() > 1800) {
4646
sleep(1000);
47-
index.setPower(-1);
47+
index.setPower(1);
4848
finger.setPosition(1);
4949
sleep(5000);
5050
index.setPower(0);
@@ -55,7 +55,7 @@ public void runOpMode() {
5555
}
5656
if (shooter.getVelocity() > 1650) {
5757
sleep(1000);
58-
index.setPower(-1);
58+
index.setPower(1);
5959
finger.setPosition(1);
6060
sleep(5000);
6161
index.setPower(0);
@@ -66,7 +66,7 @@ public void runOpMode() {
6666
}
6767
if (shooter.getVelocity() > 1650) {
6868
sleep(1000);
69-
index.setPower(-1);
69+
index.setPower(1);
7070
finger.setPosition(1);
7171
sleep(5000);
7272
index.setPower(0);

TeamCode2029/src/main/java/com/n0tasha4k/ftc/twentyfive/Right.java

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)