2024-Robot
Robot code for 2024 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
shooter_command.h
Go to the documentation of this file.
1
4
5#pragma once
6
7#include <frc2/command/Command.h>
8#include <frc2/command/CommandHelper.h>
9#include <units/time.h>
10
11#include <chrono>
12
15
16class ShooterCommand : public frc2::CommandHelper<frc2::Command, ShooterCommand> {
17 public:
18 explicit ShooterCommand(ShooterSubsystem* shooter, bool endAfterShot = false, units::millisecond_t timeout = 500_ms);
19
20 void Initialize() override;
21
22 void Execute() override;
23
24 void End(bool interrupted) override;
25
26 bool IsFinished() override;
27
28 private:
33 units::millisecond_t m_timeout;
34 std::chrono::time_point<std::chrono::steady_clock> m_startTime;
35};
Definition shooter_command.h:16
bool IsFinished() override
Definition shooter_command.cpp:43
void Execute() override
Definition shooter_command.cpp:26
ShooterSubsystem * m_pShooter
Definition shooter_command.h:29
bool m_notePresent
Definition shooter_command.h:31
bool m_endAfterShot
Definition shooter_command.h:30
std::chrono::time_point< std::chrono::steady_clock > m_startTime
Definition shooter_command.h:34
bool m_noteShot
Definition shooter_command.h:32
void Initialize() override
Definition shooter_command.cpp:18
units::millisecond_t m_timeout
Definition shooter_command.h:33
void End(bool interrupted) override
Definition shooter_command.cpp:37
Definition shooter_subsystem.h:13