RIT VEXU Core API
Loading...
Searching...
No Matches
flywheel_commands.h
1
7#pragma once
8
9#include "../core/include/subsystems/flywheel.h"
10#include "../core/include/utils/command_structure/auto_command.h"
11
17class SpinRPMCommand : public AutoCommand {
18public:
24 SpinRPMCommand(Flywheel &flywheel, int rpm);
25
31 bool run() override;
32
33private:
34 // Flywheel instance to run the function on
35 Flywheel &flywheel;
36
37 // parameters for spin_rpm
38 int rpm;
39};
40
45class WaitUntilUpToSpeedCommand : public AutoCommand {
46public:
52 WaitUntilUpToSpeedCommand(Flywheel &flywheel, int threshold_rpm);
53
59 bool run() override;
60
61private:
62 // Flywheel instance to run the function on
63 Flywheel &flywheel;
64
65 // if the actual speed is equal to the desired speed +/- this value, we are ready to fire
66 int threshold_rpm;
67};
68
74class FlywheelStopCommand : public AutoCommand {
75public:
81
87 bool run() override;
88
89private:
90 // Flywheel instance to run the function on
91 Flywheel &flywheel;
92};
93
99class FlywheelStopMotorsCommand : public AutoCommand {
100public:
106
112 bool run() override;
113
114private:
115 // Flywheel instance to run the function on
116 Flywheel &flywheel;
117};
118
124class FlywheelStopNonTasksCommand : public AutoCommand {
126
132 bool run() override;
133
134private:
135 // Flywheel instance to run the function on
136 Flywheel &flywheel;
137};
Definition flywheel_commands.h:74
FlywheelStopCommand(Flywheel &flywheel)
Definition flywheel_commands.cpp:28
bool run() override
Definition flywheel_commands.cpp:30
Definition flywheel_commands.h:99
FlywheelStopMotorsCommand(Flywheel &flywheel)
Definition flywheel_commands.cpp:35
bool run() override
Definition flywheel_commands.cpp:37
Definition flywheel_commands.h:124
Definition flywheel.h:18
Definition flywheel_commands.h:17
SpinRPMCommand(Flywheel &flywheel, int rpm)
Definition flywheel_commands.cpp:9
bool run() override
Definition flywheel_commands.cpp:11
Definition flywheel_commands.h:45
bool run() override
Definition flywheel_commands.cpp:19
WaitUntilUpToSpeedCommand(Flywheel &flywheel, int threshold_rpm)
Definition flywheel_commands.cpp:16