forked from blair-robot-project/framework2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change led length to 12 per strip, add one piece taxi auto
Note: The leds have 36 physical leds but I think one led controller controls 3 leds
- Loading branch information
Showing
8 changed files
with
1,423 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
src/main/kotlin/frc/team449/robot2023/auto/routines/OnePieceTaxi.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package frc.team449.robot2023.auto.routines | ||
|
||
import edu.wpi.first.wpilibj2.command.SequentialCommandGroup | ||
import edu.wpi.first.wpilibj2.command.WaitCommand | ||
import frc.team449.control.auto.ChoreoRoutine | ||
import frc.team449.control.auto.ChoreoRoutineStructure | ||
import frc.team449.control.auto.ChoreoTrajectory | ||
import frc.team449.robot2023.Robot | ||
import frc.team449.robot2023.auto.AutoUtil | ||
|
||
class OnePieceTaxi( | ||
robot: Robot, | ||
isRed: Boolean | ||
) : ChoreoRoutineStructure { | ||
|
||
override val routine = | ||
ChoreoRoutine( | ||
drive = robot.drive, | ||
parallelEventMap = hashMapOf( | ||
0 to robot.intake.extend().andThen( | ||
robot.elevator.high() | ||
), | ||
1 to robot.elevator.stow() | ||
), | ||
stopEventMap = hashMapOf( | ||
1 to SequentialCommandGroup( | ||
WaitCommand(1.0), | ||
robot.manipulator.outtake(), | ||
WaitCommand(1.0), | ||
robot.manipulator.stop() | ||
) | ||
) | ||
) | ||
|
||
override val trajectory: MutableList<ChoreoTrajectory> = | ||
if (isRed) { | ||
AutoUtil.transformForRed( | ||
ChoreoTrajectory.createTrajectory("1PieceTaxi") | ||
) | ||
} else { | ||
ChoreoTrajectory.createTrajectory("1PieceTaxi") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters