5#include "core/screen/screen_book.h"
6#include "core/competition/command_structure/auto_command.h"
7#include "core/math/controls/feedforward.h"
8#include "core/math/moving_average.h"
57 void spin_manual(
double speed, vex::directionType dir = vex::fwd);
104 friend class FlywheelPage;
105 friend int spinRPMTask(
void* wheelPointer);
107 vex::motor_group& motors;
108 bool task_running =
false;
113 std::atomic<double> target_rpm;
122 void set_target(
double value);
126 double measure_RPM();
134 void spin_raw(
double speed, vex::directionType dir = vex::fwd);
Definition feedforward.h:29
Definition feedback_base.h:10
Definition moving_average.h:8
AutoCommand * WaitUntilUpToSpeedCmd()
Creates a new auto command that will hold until the flywheel has its target as defined by its feedbac...
Definition flywheel.h:99
vex::motor_group & get_motors() const
Returns the motors.
Definition flywheel.cpp:20
Flywheel(vex::motor_group &motors, Feedback &feedback, FeedForward &helper, const double ratio, Filter &filt)
Definition flywheel.cpp:13
bool is_on_target()
check if the feedback controller thinks the flywheel is on target
Definition flywheel.h:74
void spin_manual(double speed, vex::directionType dir=vex::fwd)
Definition flywheel.cpp:77
void stop()
stop the RPM thread and the wheel
Definition flywheel.cpp:109
void spin_rpm(double rpm)
Definition flywheel.cpp:88
double getRPM() const
return the velocity of the flywheel
Definition flywheel.cpp:32
double get_target() const
Return the current value that the target_rpm should be set to.
Definition flywheel.cpp:17
AutoCommand * SpinRpmCmd(int rpm)
Creates a page displaying info about the flywheel.
Definition flywheel.h:87
Definition auto_command.h:91
FunctionCondition is a quick and dirty Condition to wrap some expression that should be evaluated at ...
Definition auto_command.h:120
Page describes one part of the screen slideshow.
Definition screen_pages.h:147
Waits until the condition is true.
Definition auto_command.h:145