This repository has been archived by the owner on Jan 3, 2025. It is now read-only.
-
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.
- Loading branch information
Showing
18 changed files
with
12,226 additions
and
21,694 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
53 changes: 53 additions & 0 deletions
53
src/main/cpp/commands/autonomous/autonomous_summer_activity.cpp
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,53 @@ | ||
/// \copyright Copyright (c) Argos FRC Team 1756. | ||
/// Open Source Software; you can modify and/or share it under the terms of | ||
/// the license file in the root directory of this project. | ||
|
||
#include "commands/autonomous/autonomous_summer_activity.h" | ||
|
||
#include <frc2/command/InstantCommand.h> | ||
#include <frc2/command/SequentialCommandGroup.h> | ||
#include <units/angular_velocity.h> | ||
#include <units/length.h> | ||
|
||
#include "commands/drive_choreo.h" | ||
|
||
AutonomousSummerActivty::AutonomousSummerActivty( | ||
IntakeSubsystem& intake, | ||
ShooterSubsystem& shooter, | ||
ElevatorSubsystem& elevator, | ||
ClimberSubsystem& climb, | ||
SwerveDriveSubsystem& swerve) | ||
: m_Intake{intake}, | ||
m_Shooter{shooter}, | ||
m_Elevator{elevator}, | ||
m_Climb{climb}, | ||
m_Swerve{swerve}, | ||
m_commands{frc2::SequentialCommandGroup{DriveChoreo{m_Swerve, "Any_0Note", true}}} {} | ||
|
||
// Called when the command is initially scheduled. | ||
void AutonomousSummerActivty::Initialize() { | ||
m_commands.Initialize(); | ||
} | ||
|
||
// Called repeatedly when this Command is scheduled to run | ||
void AutonomousSummerActivty::Execute() { | ||
m_commands.Execute(); | ||
} | ||
|
||
// Called once the command ends or is interrupted. | ||
void AutonomousSummerActivty::End(bool interrupted) { | ||
m_commands.End(interrupted); | ||
} | ||
|
||
// Returns true when the command should end. | ||
bool AutonomousSummerActivty::IsFinished() { | ||
return m_commands.IsFinished(); | ||
} | ||
|
||
std::string AutonomousSummerActivty::GetName() const { | ||
return "12. Summer Activity"; | ||
} | ||
|
||
frc2::Command* AutonomousSummerActivty::GetCommand() { | ||
return dynamic_cast<frc2::Command*>(this); | ||
} |
Oops, something went wrong.