RIT VEXU Core API
Loading...
Searching...
No Matches
flywheel_commands.h
1
6
7#pragma once
8
9#include "core/subsystems/flywheel.h"
10#include "core/utils/command_structure/auto_command.h"
11
17class SpinRPMCommand : public AutoCommand {
18public:
24 SpinRPMCommand(Flywheel &flywheel, int rpm);
25
31 bool run() override;
32 std::string toString() override;
33
34private:
35 // Flywheel instance to run the function on
36 Flywheel &flywheel;
37
38 // parameters for spin_rpm
39 int rpm;
40};
41
46class WaitUntilUpToSpeedCommand : public AutoCommand {
47public:
53 WaitUntilUpToSpeedCommand(Flywheel &flywheel, int threshold_rpm);
54
60 bool run() override;
61 std::string toString() override;
62
63private:
64 // Flywheel instance to run the function on
65 Flywheel &flywheel;
66
67 // if the actual speed is equal to the desired speed +/- this value, we are ready to fire
68 int threshold_rpm;
69};
70
76class FlywheelStopCommand : public AutoCommand {
77public:
83
89 bool run() override;
90
91 /*
92 * Returns a string describing the commands functionality
93 */
94 std::string toString() override;
95
96private:
97 // Flywheel instance to run the function on
98 Flywheel &flywheel;
99};
100
106class FlywheelStopMotorsCommand : public AutoCommand {
107public:
113
119 bool run() override;
120
121 /*
122 * Returns a string describing the commands functionality
123 */
124 std::string toString() override;
125
126private:
127 // Flywheel instance to run the function on
128 Flywheel &flywheel;
129};
130
136class FlywheelStopNonTasksCommand : public AutoCommand {
137 FlywheelStopNonTasksCommand(Flywheel &flywheel);
138
144 bool run() override;
145
146 /*
147 * Returns a string describing the commands functionality
148 */
149 std::string toString() override;
150
151private:
152 // Flywheel instance to run the function on
153 Flywheel &flywheel;
154};
FlywheelStopCommand(Flywheel &flywheel)
Definition flywheel_commands.cpp:38
bool run() override
Definition flywheel_commands.cpp:40
FlywheelStopMotorsCommand(Flywheel &flywheel)
Definition flywheel_commands.cpp:50
bool run() override
Definition flywheel_commands.cpp:52
Definition flywheel.h:18
SpinRPMCommand(Flywheel &flywheel, int rpm)
Definition flywheel_commands.cpp:9
bool run() override
Definition flywheel_commands.cpp:11
bool run() override
Definition flywheel_commands.cpp:24
WaitUntilUpToSpeedCommand(Flywheel &flywheel, int threshold_rpm)
Definition flywheel_commands.cpp:21