RIT VEXU Core API
Loading...
Searching...
No Matches
TurnDegreesCommand Class Reference

#include <drive_commands.h>

Inherits AutoCommand.

Public Member Functions

 TurnDegreesCommand (TankDrive &drive_sys, Feedback &feedback, double degrees, double max_speed=1, double end_speed=0)
 
bool run () override
 
void on_timeout () override
 

Detailed Description

AutoCommand wrapper class for the turn_degrees function in the TankDrive class

Constructor & Destructor Documentation

◆ TurnDegreesCommand()

TurnDegreesCommand::TurnDegreesCommand ( TankDrive & drive_sys,
Feedback & feedback,
double degrees,
double max_speed = 1,
double end_speed = 0 )

Construct a TurnDegreesCommand Command

Parameters
drive_systhe drive system we are commanding
feedbackthe feedback controller we are using to execute the turn
degreeshow many degrees to rotate
max_speed0 -> 1 percentage of the drive systems speed to drive at

Member Function Documentation

◆ on_timeout()

void TurnDegreesCommand::on_timeout ( )
override

Cleans up drive system if we time out before finishing

reset the drive system if we timeout

◆ run()

bool TurnDegreesCommand::run ( )
override

Run turn_degrees Overrides run from AutoCommand

Returns
true when execution is complete, false otherwise

The documentation for this class was generated from the following files: