Skip to content
This repository was archived by the owner on Sep 12, 2023. It is now read-only.

Commit 32a9ef5

Browse files
committed
still working on autonomous, comment out some code so will build
1 parent 013daf5 commit 32a9ef5

File tree

10 files changed

+51
-90
lines changed

10 files changed

+51
-90
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
import org.firstinspires.ftc.teamcode.subsystems.DepositSubsystem;
1212
import org.firstinspires.ftc.teamcode.subsystems.DrivebaseSubsystem;
1313

14-
public class AutonomousDuckCommand extends SequentialCommandGroup {
15-
public AutonomousDuckCommand(DrivebaseSubsystem drive, CarouselSubsystem carousel){
14+
public class AutonomousDuckCommandGroup extends SequentialCommandGroup {
15+
public AutonomousDuckCommandGroup(DrivebaseSubsystem drive, CarouselSubsystem carousel){
1616
super(new TrajectorySequenceCommand(drive, AutonomousConstants.DUCK_START_TO_CAROUSEL),
1717
new CarouselSpinCommand(carousel).withTimeout(3),
1818
new TrajectorySequenceCommand(drive, AutonomousConstants.DUCK_CAROUSEL_TO_PARK),
19-
CommandScheduler.getInstance()::terminateOpMode);
19+
CommandScheduler.getInstance()::terminateOpMode); //ending
2020
}
2121
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
package org.firstinspires.ftc.teamcode.commands.autonomous;
22

33
import com.technototes.library.command.SequentialCommandGroup;
4+
import com.technototes.path.command.TrajectorySequenceCommand;
45

56
import org.firstinspires.ftc.teamcode.subsystems.BucketSubsystem;
67
import org.firstinspires.ftc.teamcode.subsystems.DrivebaseSubsystem;
78

89
public class AutonomousLoopCommandGroup extends SequentialCommandGroup {
910
public AutonomousLoopCommandGroup(DrivebaseSubsystem drivebaseSystem, BucketSubsystem bucketSystem){
10-
// new GoToDepotFromShelfCommand(),
11-
// new DepotLoadingBlockCommand(),
12-
// new GoToShelfFromDepotCommand(),
13-
// new ShelfUnloadingLevel3Command(),
11+
// new TrajectorySequenceCommand(); //from shelf to depot
12+
new DepotLoadingBlockCommand();
13+
// new TrajectorySequenceCommand(); //from depot to shelf
14+
new ShelfUnloadingLevel3Command();
1415
}
1516
}

TechnoTwoCode/src/main/java/org/firstinspires/ftc/teamcode/commands/autonomous/AutonomousPhaseCommand.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,23 @@
33
*/
44
package org.firstinspires.ftc.teamcode.commands.autonomous;
55

6+
import com.technototes.library.command.CommandScheduler;
67
import com.technototes.library.command.SequentialCommandGroup;
8+
import com.technototes.path.command.TrajectorySequenceCommand;
79

810
import org.firstinspires.ftc.teamcode.subsystems.BucketSubsystem;
911
import org.firstinspires.ftc.teamcode.subsystems.CarouselSubsystem;
1012
import org.firstinspires.ftc.teamcode.subsystems.DrivebaseSubsystem;
1113

1214
public class AutonomousPhaseCommand extends SequentialCommandGroup {
1315
public AutonomousPhaseCommand(DrivebaseSubsystem drivebaseSystem, CarouselSubsystem carouselSystem, BucketSubsystem bucketSystem){
14-
super(new AutonomousDuckCommand(drivebaseSystem, carouselSystem), //goto carousel and spin it
15-
new GoToShelfFromCarouselCommand(), //after finish the duck
16+
super(new AutonomousDuckCommandGroup(drivebaseSystem, carouselSystem), //goto carousel and spin it
17+
// new TrajectorySequenceCommand(), //duck goto shipping hub
1618
new ShelfUnloadingLevel3Command(), //unload the preloaded cube
1719
new AutonomousLoopCommandGroup(drivebaseSystem, bucketSystem), //assuming running for three loops
1820
new AutonomousLoopCommandGroup(drivebaseSystem, bucketSystem),
1921
new AutonomousLoopCommandGroup(drivebaseSystem, bucketSystem),
20-
new GoToParkingFromShelfCommand()); //goto parking
22+
// new TrajectorySequenceCommand(), //goto parking
23+
CommandScheduler.getInstance()::terminateOpMode); //ending
2124
}
2225
}

TechnoTwoCode/src/main/java/org/firstinspires/ftc/teamcode/commands/autonomous/GoToCarouselFromSpawnCommand.java

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

TechnoTwoCode/src/main/java/org/firstinspires/ftc/teamcode/commands/autonomous/GoToDepotFromShelfCommand.java

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

TechnoTwoCode/src/main/java/org/firstinspires/ftc/teamcode/commands/autonomous/GoToParkingFromShelfCommand.java

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

TechnoTwoCode/src/main/java/org/firstinspires/ftc/teamcode/commands/autonomous/GoToShelfFromCarouselCommand.java

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

TechnoTwoCode/src/main/java/org/firstinspires/ftc/teamcode/commands/autonomous/GoToShelfFromDepotCommand.java

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* equivalent to CycleBlueAuto.java
3+
*/
14
package org.firstinspires.ftc.teamcode.opmodes;
25
import com.acmerobotics.dashboard.FtcDashboard;
36
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
@@ -7,14 +10,13 @@
710
import com.technototes.library.structure.CommandOpMode;
811
import com.technototes.library.util.Alliance;
912

10-
import org.firstinspires.ftc.robotcore.external.Telemetry;
1113
import org.firstinspires.ftc.teamcode.Robot;
1214
import org.firstinspires.ftc.teamcode.commands.autonomous.AutonomousConstants;
13-
import org.firstinspires.ftc.teamcode.commands.autonomous.AutonomousDuckCommand;
15+
import org.firstinspires.ftc.teamcode.commands.autonomous.AutonomousPhaseCommand;
1416

1517
@Autonomous(name = "Blue Duck")
1618
public class BlueDuckAuto extends CommandOpMode implements Loggable{
17-
public Robot robot;
19+
public Robot robot;
1820

1921
@Override
2022
public void uponInit() {
@@ -24,6 +26,6 @@ public void uponInit() {
2426
robot = new Robot();
2527
robot.drivebaseSubsystem.setPoseEstimate(AutonomousConstants.DUCK_START_SELECT.get());
2628

27-
CommandScheduler.getInstance().scheduleForState(new AutonomousDuckCommand(robot.drivebaseSubsystem, robot.carouselSubsystem), OpModeState.RUN);
29+
CommandScheduler.getInstance().scheduleForState(new AutonomousPhaseCommand(robot.drivebaseSubsystem, robot.carouselSubsystem, robot.bucketSubsystem), OpModeState.RUN);
2830
}
2931
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* copy from BlueDuckAuto.java
3+
*/
4+
package org.firstinspires.ftc.teamcode.opmodes;
5+
import com.acmerobotics.dashboard.FtcDashboard;
6+
import com.acmerobotics.dashboard.telemetry.MultipleTelemetry;
7+
import com.qualcomm.robotcore.eventloop.opmode.Autonomous;
8+
import com.technototes.library.command.CommandScheduler;
9+
import com.technototes.library.logger.Loggable;
10+
import com.technototes.library.structure.CommandOpMode;
11+
import com.technototes.library.util.Alliance;
12+
13+
import org.firstinspires.ftc.teamcode.Robot;
14+
import org.firstinspires.ftc.teamcode.commands.autonomous.AutonomousConstants;
15+
import org.firstinspires.ftc.teamcode.commands.autonomous.AutonomousPhaseCommand;
16+
17+
@Autonomous(name = "Red Duck")
18+
public class RedDuckAuto extends CommandOpMode implements Loggable{
19+
public Robot robot;
20+
21+
@Override
22+
public void uponInit() {
23+
AutonomousConstants.ALLIANCE = Alliance.RED;
24+
telemetry = new MultipleTelemetry(telemetry, FtcDashboard.getInstance().getTelemetry());
25+
26+
robot = new Robot();
27+
robot.drivebaseSubsystem.setPoseEstimate(AutonomousConstants.DUCK_START_SELECT.get());
28+
29+
CommandScheduler.getInstance().scheduleForState(new AutonomousPhaseCommand(robot.drivebaseSubsystem, robot.carouselSubsystem, robot.bucketSubsystem), OpModeState.RUN);
30+
}
31+
}

0 commit comments

Comments
 (0)