Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Commit

Permalink
add to RobotContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
jug1000 committed Jun 26, 2024
1 parent 5ddd31d commit 2d2ceaa
Show file tree
Hide file tree
Showing 18 changed files with 12,226 additions and 21,694 deletions.
12,104 changes: 12,104 additions & 0 deletions src/main/Choreo autobuilder origional.chor

Large diffs are not rendered by default.

12,074 changes: 7 additions & 12,067 deletions src/main/Choreo autobuilder.chor

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions src/main/cpp/RobotContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ RobotContainer::RobotContainer()
// &m_autoSourceSideSubwoofer3PieceSteal,
&m_autoChoreoTest},
&m_autoNothing}
, m_autoSummer{m_intakeSubsystem,
m_ShooterSubSystem,
m_elevatorSubsystem,
m_climberSubsystem,
m_swerveDrive}
, m_transitionedFromAuto{false} {
// Initialize all of your commands and subsystems here

Expand Down
53 changes: 53 additions & 0 deletions src/main/cpp/commands/autonomous/autonomous_summer_activity.cpp
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);
}
Loading

0 comments on commit 2d2ceaa

Please sign in to comment.