|
Fang-Robotics-MCB
Fang Robotics Team Codebase
|
#include <simple_ammo_booster.hpp>


Classes | |
| struct | Config |
Public Types | |
| using | Flywheel = motor::ISpeedWheel |
| using | Flywheels = std::vector< std::unique_ptr< Flywheel > > |
Public Member Functions | |
| SimpleAmmoBooster (Drivers &drivers, Flywheels flywheels, const Config &config) | |
| void | boostOn () override |
| void | boostOff () override |
| void | update () override |
| void | refresh () override |
| void | initialize () override |
Public Member Functions inherited from fang::turret::SimpleAmmoBoosterSubsystem | |
| SimpleAmmoBoosterSubsystem (tap::Drivers &drivers) | |
| virtual | ~SimpleAmmoBoosterSubsystem ()=default |
Public Member Functions inherited from tap::control::Subsystem | |
| Subsystem (Drivers *drivers) | |
| virtual | ~Subsystem () |
| void | registerAndInitialize () |
| mockable void | setDefaultCommand (Command *defaultCommand) |
| mockable Command * | getDefaultCommand () const |
| virtual void | refreshSafeDisconnect () |
| mockable void | setTestCommand (Command *testCommand) |
| mockable Command * | getTestCommand () const |
| virtual const char * | getName () const |
| mockable int | getGlobalIdentifier () const |
Additional Inherited Members | |
Protected Attributes inherited from tap::control::Subsystem | |
| Drivers * | drivers |
Manages two flywheels. Update must been called periodically. Assumes they are horizontal.
| using fang::turret::SimpleAmmoBooster::Flywheels = std::vector<std::unique_ptr<Flywheel> > |
| fang::turret::SimpleAmmoBooster::SimpleAmmoBooster | ( | Drivers & | drivers, |
| Flywheels | flywheels, | ||
| const Config & | config | ||
| ) |
You need to std::move the vector of flywheels. Theoretically, it should throw an error should you attempt to copy unique pointers.
|
override |
|
override |
|
overridevirtual |
Called once when you add the Subsystem to the commandScheduler stored in the Drivers class.
Implements fang::turret::SimpleAmmoBoosterSubsystem.
|
overridevirtual |
Called in the scheduler's run function assuming this command has been registered with the scheduler. This function should contain code that must be periodically updated and is generic to the subsystem (i.e. updating a control loop generic to this subsystem). This function should not contain command specific control code. When you create a subclass of Subsystem, you should overwrite this virtual function.
Must be virtual otherwise scheduler will refer to this function rather than looking in child for this function.
Reimplemented from tap::control::Subsystem.
|
override |