RIT VEXU Core API
Toggle main menu visibility
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
17
class
SpinRPMCommand
:
public
AutoCommand {
18
public
:
24
SpinRPMCommand
(
Flywheel
&flywheel,
int
rpm);
25
31
bool
run
()
override
;
32
std::string toString()
override
;
33
34
private
:
35
// Flywheel instance to run the function on
36
Flywheel
&flywheel;
37
38
// parameters for spin_rpm
39
int
rpm;
40
};
41
46
class
WaitUntilUpToSpeedCommand
:
public
AutoCommand {
47
public
:
53
WaitUntilUpToSpeedCommand
(
Flywheel
&flywheel,
int
threshold_rpm);
54
60
bool
run
()
override
;
61
std::string toString()
override
;
62
63
private
:
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
76
class
FlywheelStopCommand
:
public
AutoCommand {
77
public
:
82
FlywheelStopCommand
(
Flywheel
&flywheel);
83
89
bool
run
()
override
;
90
91
/*
92
* Returns a string describing the commands functionality
93
*/
94
std::string toString()
override
;
95
96
private
:
97
// Flywheel instance to run the function on
98
Flywheel
&flywheel;
99
};
100
106
class
FlywheelStopMotorsCommand
:
public
AutoCommand {
107
public
:
112
FlywheelStopMotorsCommand
(
Flywheel
&flywheel);
113
119
bool
run
()
override
;
120
121
/*
122
* Returns a string describing the commands functionality
123
*/
124
std::string toString()
override
;
125
126
private
:
127
// Flywheel instance to run the function on
128
Flywheel
&flywheel;
129
};
130
136
class
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
151
private
:
152
// Flywheel instance to run the function on
153
Flywheel
&flywheel;
154
};
FlywheelStopCommand::FlywheelStopCommand
FlywheelStopCommand(Flywheel &flywheel)
Definition
flywheel_commands.cpp:38
FlywheelStopCommand::run
bool run() override
Definition
flywheel_commands.cpp:40
FlywheelStopMotorsCommand::FlywheelStopMotorsCommand
FlywheelStopMotorsCommand(Flywheel &flywheel)
Definition
flywheel_commands.cpp:50
FlywheelStopMotorsCommand::run
bool run() override
Definition
flywheel_commands.cpp:52
Flywheel
Definition
flywheel.h:18
SpinRPMCommand::SpinRPMCommand
SpinRPMCommand(Flywheel &flywheel, int rpm)
Definition
flywheel_commands.cpp:9
SpinRPMCommand::run
bool run() override
Definition
flywheel_commands.cpp:11
WaitUntilUpToSpeedCommand::run
bool run() override
Definition
flywheel_commands.cpp:24
WaitUntilUpToSpeedCommand::WaitUntilUpToSpeedCommand
WaitUntilUpToSpeedCommand(Flywheel &flywheel, int threshold_rpm)
Definition
flywheel_commands.cpp:21
include
core
utils
command_structure
flywheel_commands.h
Generated by
1.17.0