Skip to content

Commit

Permalink
recooked autos
Browse files Browse the repository at this point in the history
  • Loading branch information
r4stered committed Nov 1, 2024
1 parent 536d149 commit 3e4ad5f
Show file tree
Hide file tree
Showing 11 changed files with 1,173 additions and 1,100 deletions.
405 changes: 204 additions & 201 deletions src/main/deploy/choreo/AmpSide.traj

Large diffs are not rendered by default.

206 changes: 104 additions & 102 deletions src/main/deploy/choreo/AmpSideCloseNotes.traj

Large diffs are not rendered by default.

181 changes: 92 additions & 89 deletions src/main/deploy/choreo/AmpSideGoForSecond.traj

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions src/main/deploy/choreo/AmpSideSafe.traj

Large diffs are not rendered by default.

730 changes: 369 additions & 361 deletions src/main/deploy/choreo/CloseFourSafe.traj

Large diffs are not rendered by default.

320 changes: 164 additions & 156 deletions src/main/deploy/choreo/SourceGoForSecond.traj

Large diffs are not rendered by default.

150 changes: 76 additions & 74 deletions src/main/deploy/choreo/SourceSide.traj

Large diffs are not rendered by default.

38 changes: 38 additions & 0 deletions src/main/deploy/pathplanner/autos/AmpDash.auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"version": "2025.0",
"command": {
"type": "sequential",
"data": {
"commands": [
{
"type": "named",
"data": {
"name": "Spit"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "path",
"data": {
"pathName": "AmpSide.0"
}
},
{
"type": "named",
"data": {
"name": "Intake"
}
}
]
}
}
]
}
},
"resetOdom": true,
"folder": null,
"choreoAuto": true
}
File renamed without changes.
2 changes: 1 addition & 1 deletion src/main/deploy/pathplanner/autos/Source.auto
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{
"type": "path",
"data": {
"pathName": "SourceSideSafe"
"pathName": "SourceSide.0"
}
},
{
Expand Down
41 changes: 25 additions & 16 deletions src/main/include/Autos.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,36 @@ class Autos {
std::pair{CHOREO_TEST, TestChoreoAuto()},
std::pair{CLOSE_FOUR_SAFE, pathplanner::PathPlannerAuto("SafeCloseFour").ToPtr()},
std::pair{SOURCE_SIDE, frc2::cmd::Sequence(
pathplanner::PathPlannerAuto("Source").ToPtr()
// frc2::cmd::Wait(.5_s),
// frc2::cmd::Either(
// pathplanner::PathPlannerAuto("SourceGotNote").ToPtr(),
// pathplanner::PathPlannerAuto("SourceNoNote").ToPtr(),
// [this] { return m_feederSub.HasNote(); })
pathplanner::PathPlannerAuto("Source").ToPtr(),
frc2::cmd::Wait(.5_s),
frc2::cmd::Either(
pathplanner::PathPlannerAuto("SourceGotNote").ToPtr(),
pathplanner::PathPlannerAuto("SourceNoNote").ToPtr(),
[this] { return m_feederSub.HasNote(); })
)},
std::pair{AMP_SIDE, frc2::cmd::Sequence(
pathplanner::PathPlannerAuto("Amp").ToPtr()
// frc2::cmd::Wait(.5_s),
// frc2::cmd::Either(
// pathplanner::PathPlannerAuto("AmpGotNote").ToPtr(),
// pathplanner::PathPlannerAuto("AmpNoNote").ToPtr(),
// [this] { return m_feederSub.HasNote(); }),
// pathplanner::PathPlannerAuto("AmpClose").ToPtr()
std::pair{AMP_SIDE_SAFE, frc2::cmd::Sequence(
pathplanner::PathPlannerAuto("AmpSafe").ToPtr(),
frc2::cmd::Wait(.5_s),
frc2::cmd::Either(
pathplanner::PathPlannerAuto("AmpGotNote").ToPtr(),
pathplanner::PathPlannerAuto("AmpNoNote").ToPtr(),
[this] { return m_feederSub.HasNote(); })
)},
std::pair{AMP_SIDE_DASH, frc2::cmd::Sequence(
pathplanner::PathPlannerAuto("AmpDash").ToPtr(),
frc2::cmd::Wait(.5_s),
frc2::cmd::Either(
pathplanner::PathPlannerAuto("AmpGotNote").ToPtr(),
pathplanner::PathPlannerAuto("AmpNoNote").ToPtr(),
[this] { return m_feederSub.HasNote(); }),
pathplanner::PathPlannerAuto("AmpClose").ToPtr()
)});

autoChooser.AddOption("Choreo Test", AutoSelector::CHOREO_TEST);
autoChooser.AddOption("Close Four Safe", AutoSelector::CLOSE_FOUR_SAFE);
autoChooser.AddOption("Source", AutoSelector::SOURCE_SIDE);
autoChooser.AddOption("Amp", AutoSelector::AMP_SIDE);
autoChooser.AddOption("Amp Safe", AutoSelector::AMP_SIDE_SAFE);
autoChooser.AddOption("Amp Dash", AutoSelector::AMP_SIDE_DASH);

frc::SmartDashboard::PutData("Auto Chooser", &autoChooser);
}
Expand Down Expand Up @@ -131,7 +140,7 @@ class Autos {
);
}

enum AutoSelector { CHOREO_TEST, PP_TEST, CLOSE_FOUR_SAFE, SOURCE_SIDE, AMP_SIDE };
enum AutoSelector { CHOREO_TEST, PP_TEST, CLOSE_FOUR_SAFE, SOURCE_SIDE, AMP_SIDE_SAFE, AMP_SIDE_DASH };

frc::SendableChooser<AutoSelector> autoChooser;

Expand Down

0 comments on commit 3e4ad5f

Please sign in to comment.