Skip to content

Commit 78f09db

Browse files
authored
Merge pull request #33 from technototes/dual-mec-db
Renaming the dual MecanumDrivebaseSubsystems
2 parents f63ca11 + 289b2f8 commit 78f09db

File tree

573 files changed

+49657
-48015
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

573 files changed

+49657
-48015
lines changed

Path/src/main/java/com/technototes/path/command/MecanumDriveCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
import com.acmerobotics.roadrunner.geometry.Pose2d;
55
import com.acmerobotics.roadrunner.geometry.Vector2d;
66
import com.technototes.library.command.Command;
7-
import com.technototes.path.subsystem.MecanumDrivebaseSubsystem;
7+
import com.technototes.path.subsystem.PathingMecanumDrivebaseSubsystem;
88
import java.util.function.DoubleSupplier;
99

1010
public class MecanumDriveCommand implements Command {
1111

12-
public MecanumDrivebaseSubsystem subsystem;
12+
public PathingMecanumDrivebaseSubsystem subsystem;
1313
public DoubleSupplier x, y, r;
1414

1515
public MecanumDriveCommand(
16-
MecanumDrivebaseSubsystem sub,
16+
PathingMecanumDrivebaseSubsystem sub,
1717
DoubleSupplier xSup,
1818
DoubleSupplier ySup,
1919
DoubleSupplier rSup

Path/src/main/java/com/technototes/path/command/RegenerativeTrajectoryCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.acmerobotics.roadrunner.geometry.Pose2d;
44
import com.acmerobotics.roadrunner.trajectory.Trajectory;
55
import com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder;
6-
import com.technototes.path.subsystem.MecanumDrivebaseSubsystem;
6+
import com.technototes.path.subsystem.PathingMecanumDrivebaseSubsystem;
77
import java.util.function.BiFunction;
88
import java.util.function.Function;
99
import java.util.function.Supplier;
@@ -13,28 +13,28 @@ public class RegenerativeTrajectoryCommand extends TrajectoryCommand {
1313
public Supplier<Trajectory> trajFunc;
1414

1515
public RegenerativeTrajectoryCommand(
16-
MecanumDrivebaseSubsystem sub,
16+
PathingMecanumDrivebaseSubsystem sub,
1717
Function<Function<Pose2d, TrajectoryBuilder>, Trajectory> t
1818
) {
1919
super(sub, t);
2020
trajFunc = () -> t.apply(sub::trajectoryBuilder);
2121
}
2222

23-
public RegenerativeTrajectoryCommand(MecanumDrivebaseSubsystem sub, Supplier<Trajectory> t) {
23+
public RegenerativeTrajectoryCommand(PathingMecanumDrivebaseSubsystem sub, Supplier<Trajectory> t) {
2424
super(sub, t);
2525
trajFunc = t;
2626
}
2727

2828
public <T> RegenerativeTrajectoryCommand(
29-
MecanumDrivebaseSubsystem sub,
29+
PathingMecanumDrivebaseSubsystem sub,
3030
BiFunction<Function<Pose2d, TrajectoryBuilder>, T, Trajectory> t,
3131
T mux
3232
) {
3333
super(sub, t, mux);
3434
trajFunc = () -> t.apply(sub::trajectoryBuilder, mux);
3535
}
3636

37-
public <T> RegenerativeTrajectoryCommand(MecanumDrivebaseSubsystem sub, Function<T, Trajectory> t, T mux) {
37+
public <T> RegenerativeTrajectoryCommand(PathingMecanumDrivebaseSubsystem sub, Function<T, Trajectory> t, T mux) {
3838
super(sub, t, mux);
3939
trajFunc = () -> t.apply(mux);
4040
}

Path/src/main/java/com/technototes/path/command/RegenerativeTrajectorySequenceCommand.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.technototes.path.command;
22

33
import com.acmerobotics.roadrunner.geometry.Pose2d;
4-
import com.technototes.path.subsystem.MecanumDrivebaseSubsystem;
4+
import com.technototes.path.subsystem.PathingMecanumDrivebaseSubsystem;
55
import com.technototes.path.trajectorysequence.TrajectorySequence;
66
import com.technototes.path.trajectorysequence.TrajectorySequenceBuilder;
77
import java.util.function.BiFunction;
@@ -13,20 +13,20 @@ public class RegenerativeTrajectorySequenceCommand extends TrajectorySequenceCom
1313
public Supplier<TrajectorySequence> trajFunc;
1414

1515
public RegenerativeTrajectorySequenceCommand(
16-
MecanumDrivebaseSubsystem sub,
16+
PathingMecanumDrivebaseSubsystem sub,
1717
Function<Function<Pose2d, TrajectorySequenceBuilder>, TrajectorySequence> t
1818
) {
1919
super(sub, t);
2020
trajFunc = () -> t.apply(sub::trajectorySequenceBuilder);
2121
}
2222

23-
public RegenerativeTrajectorySequenceCommand(MecanumDrivebaseSubsystem sub, Supplier<TrajectorySequence> t) {
23+
public RegenerativeTrajectorySequenceCommand(PathingMecanumDrivebaseSubsystem sub, Supplier<TrajectorySequence> t) {
2424
super(sub, t);
2525
trajFunc = t;
2626
}
2727

2828
public <T> RegenerativeTrajectorySequenceCommand(
29-
MecanumDrivebaseSubsystem sub,
29+
PathingMecanumDrivebaseSubsystem sub,
3030
BiFunction<Function<Pose2d, TrajectorySequenceBuilder>, T, TrajectorySequence> t,
3131
T mux
3232
) {
@@ -35,7 +35,7 @@ public <T> RegenerativeTrajectorySequenceCommand(
3535
}
3636

3737
public <T> RegenerativeTrajectorySequenceCommand(
38-
MecanumDrivebaseSubsystem sub,
38+
PathingMecanumDrivebaseSubsystem sub,
3939
Function<T, TrajectorySequence> t,
4040
T mux
4141
) {

Path/src/main/java/com/technototes/path/command/ResetGyroCommand.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package com.technototes.path.command;
22

33
import com.technototes.library.command.Command;
4-
import com.technototes.path.subsystem.MecanumDrivebaseSubsystem;
4+
import com.technototes.path.subsystem.PathingMecanumDrivebaseSubsystem;
55

66
public class ResetGyroCommand implements Command {
77

8-
public MecanumDrivebaseSubsystem subsystem;
8+
public PathingMecanumDrivebaseSubsystem subsystem;
99

10-
public ResetGyroCommand(MecanumDrivebaseSubsystem s) {
10+
public ResetGyroCommand(PathingMecanumDrivebaseSubsystem s) {
1111
subsystem = s;
1212
}
1313

Path/src/main/java/com/technototes/path/command/TrajectoryCommand.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,39 @@
44
import com.acmerobotics.roadrunner.trajectory.Trajectory;
55
import com.acmerobotics.roadrunner.trajectory.TrajectoryBuilder;
66
import com.technototes.library.command.Command;
7-
import com.technototes.path.subsystem.MecanumDrivebaseSubsystem;
7+
import com.technototes.path.subsystem.PathingMecanumDrivebaseSubsystem;
88
import java.util.function.BiFunction;
99
import java.util.function.Function;
1010
import java.util.function.Supplier;
1111

1212
public class TrajectoryCommand implements Command {
1313

1414
public Trajectory trajectory;
15-
public MecanumDrivebaseSubsystem subsystem;
15+
public PathingMecanumDrivebaseSubsystem subsystem;
1616

17-
public TrajectoryCommand(MecanumDrivebaseSubsystem sub, Trajectory t) {
17+
public TrajectoryCommand(PathingMecanumDrivebaseSubsystem sub, Trajectory t) {
1818
addRequirements(sub);
1919
subsystem = sub;
2020
trajectory = t;
2121
}
2222

2323
public TrajectoryCommand(
24-
MecanumDrivebaseSubsystem sub,
24+
PathingMecanumDrivebaseSubsystem sub,
2525
Function<Function<Pose2d, TrajectoryBuilder>, Trajectory> t
2626
) {
2727
addRequirements(sub);
2828
subsystem = sub;
2929
trajectory = t.apply(sub::trajectoryBuilder);
3030
}
3131

32-
public TrajectoryCommand(MecanumDrivebaseSubsystem sub, Supplier<Trajectory> t) {
32+
public TrajectoryCommand(PathingMecanumDrivebaseSubsystem sub, Supplier<Trajectory> t) {
3333
addRequirements(sub);
3434
subsystem = sub;
3535
trajectory = t.get();
3636
}
3737

3838
public <T> TrajectoryCommand(
39-
MecanumDrivebaseSubsystem sub,
39+
PathingMecanumDrivebaseSubsystem sub,
4040
BiFunction<Function<Pose2d, TrajectoryBuilder>, T, Trajectory> t,
4141
T mux
4242
) {
@@ -45,7 +45,7 @@ public <T> TrajectoryCommand(
4545
trajectory = t.apply(sub::trajectoryBuilder, mux);
4646
}
4747

48-
public <T> TrajectoryCommand(MecanumDrivebaseSubsystem sub, Function<T, Trajectory> t, T mux) {
48+
public <T> TrajectoryCommand(PathingMecanumDrivebaseSubsystem sub, Function<T, Trajectory> t, T mux) {
4949
addRequirements(sub);
5050
subsystem = sub;
5151
trajectory = t.apply(mux);

Path/src/main/java/com/technototes/path/command/TrajectorySequenceCommand.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.acmerobotics.roadrunner.geometry.Pose2d;
44
import com.technototes.library.command.Command;
5-
import com.technototes.path.subsystem.MecanumDrivebaseSubsystem;
5+
import com.technototes.path.subsystem.PathingMecanumDrivebaseSubsystem;
66
import com.technototes.path.trajectorysequence.TrajectorySequence;
77
import com.technototes.path.trajectorysequence.TrajectorySequenceBuilder;
88
import java.util.function.BiFunction;
@@ -12,31 +12,31 @@
1212
public class TrajectorySequenceCommand implements Command {
1313

1414
public TrajectorySequence trajectory;
15-
public MecanumDrivebaseSubsystem subsystem;
15+
public PathingMecanumDrivebaseSubsystem subsystem;
1616

17-
public TrajectorySequenceCommand(MecanumDrivebaseSubsystem sub, TrajectorySequence t) {
17+
public TrajectorySequenceCommand(PathingMecanumDrivebaseSubsystem sub, TrajectorySequence t) {
1818
addRequirements(sub);
1919
subsystem = sub;
2020
trajectory = t;
2121
}
2222

2323
public TrajectorySequenceCommand(
24-
MecanumDrivebaseSubsystem sub,
24+
PathingMecanumDrivebaseSubsystem sub,
2525
Function<Function<Pose2d, TrajectorySequenceBuilder>, TrajectorySequence> t
2626
) {
2727
addRequirements(sub);
2828
subsystem = sub;
2929
trajectory = t.apply(sub::trajectorySequenceBuilder);
3030
}
3131

32-
public TrajectorySequenceCommand(MecanumDrivebaseSubsystem sub, Supplier<TrajectorySequence> t) {
32+
public TrajectorySequenceCommand(PathingMecanumDrivebaseSubsystem sub, Supplier<TrajectorySequence> t) {
3333
addRequirements(sub);
3434
subsystem = sub;
3535
trajectory = t.get();
3636
}
3737

3838
public <T> TrajectorySequenceCommand(
39-
MecanumDrivebaseSubsystem sub,
39+
PathingMecanumDrivebaseSubsystem sub,
4040
BiFunction<Function<Pose2d, TrajectorySequenceBuilder>, T, TrajectorySequence> t,
4141
T mux
4242
) {
@@ -45,7 +45,11 @@ public <T> TrajectorySequenceCommand(
4545
trajectory = t.apply(sub::trajectorySequenceBuilder, mux);
4646
}
4747

48-
public <T> TrajectorySequenceCommand(MecanumDrivebaseSubsystem sub, Function<T, TrajectorySequence> t, T mux) {
48+
public <T> TrajectorySequenceCommand(
49+
PathingMecanumDrivebaseSubsystem sub,
50+
Function<T, TrajectorySequence> t,
51+
T mux
52+
) {
4953
addRequirements(sub);
5054
subsystem = sub;
5155
trajectory = t.apply(mux);

Path/src/main/java/com/technototes/path/subsystem/MecanumDrivebaseSubsystem.java renamed to Path/src/main/java/com/technototes/path/subsystem/PathingMecanumDrivebaseSubsystem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
import org.firstinspires.ftc.robotcore.external.navigation.AngleUnit;
6060

6161
@SuppressWarnings("unused")
62-
public class MecanumDrivebaseSubsystem extends MecanumDrive implements Subsystem {
62+
public class PathingMecanumDrivebaseSubsystem extends MecanumDrive implements Subsystem {
6363

6464
public double speed = 1;
6565

@@ -95,7 +95,7 @@ public enum Mode {
9595

9696
protected VoltageSensor batteryVoltageSensor;
9797

98-
public MecanumDrivebaseSubsystem(
98+
public PathingMecanumDrivebaseSubsystem(
9999
EncodedMotor<DcMotorEx> fl,
100100
EncodedMotor<DcMotorEx> fr,
101101
EncodedMotor<DcMotorEx> rl,
@@ -106,7 +106,7 @@ public MecanumDrivebaseSubsystem(
106106
this(fl, fr, rl, rr, i, c, null);
107107
}
108108

109-
public MecanumDrivebaseSubsystem(
109+
public PathingMecanumDrivebaseSubsystem(
110110
EncodedMotor<DcMotorEx> fl,
111111
EncodedMotor<DcMotorEx> fr,
112112
EncodedMotor<DcMotorEx> rl,

RobotLibrary/src/main/java/com/technototes/library/subsystem/drivebase/MecanumDrivebaseSubsystem.java renamed to RobotLibrary/src/main/java/com/technototes/library/subsystem/drivebase/SimpleMecanumDrivebaseSubsystem.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @author Alex Stedman
1010
* @param <T> The motor type for the subsystem
1111
*/
12-
public class MecanumDrivebaseSubsystem<T extends DcMotorSimple> extends DrivebaseSubsystem<T> {
12+
public class SimpleMecanumDrivebaseSubsystem<T extends DcMotorSimple> extends DrivebaseSubsystem<T> {
1313

1414
/** Drive motors
1515
*
@@ -23,7 +23,7 @@ public class MecanumDrivebaseSubsystem<T extends DcMotorSimple> extends Drivebas
2323
* @param rlMotor The rear left motor for the drivebase
2424
* @param rrMotor The rear right motor for the drivebase
2525
*/
26-
public MecanumDrivebaseSubsystem(Motor<T> flMotor, Motor<T> frMotor, Motor<T> rlMotor, Motor<T> rrMotor) {
26+
public SimpleMecanumDrivebaseSubsystem(Motor<T> flMotor, Motor<T> frMotor, Motor<T> rlMotor, Motor<T> rrMotor) {
2727
super(flMotor, frMotor, rlMotor, rrMotor);
2828
this.flMotor = flMotor;
2929
this.frMotor = frMotor;
@@ -39,7 +39,7 @@ public MecanumDrivebaseSubsystem(Motor<T> flMotor, Motor<T> frMotor, Motor<T> rl
3939
* @param rlMotor The rear left motor for the drivebase
4040
* @param rrMotor The rear right motor for the drivebase
4141
*/
42-
public MecanumDrivebaseSubsystem(
42+
public SimpleMecanumDrivebaseSubsystem(
4343
DoubleSupplier gyro,
4444
Motor<T> flMotor,
4545
Motor<T> frMotor,

0 commit comments

Comments
 (0)