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

#include <drive_commands.h>

Inherits AutoCommand.

Public Member Functions

 DriveToPointCommand (TankDrive &drive_sys, Feedback &feedback, double x, double y, directionType dir, double max_speed=1, double end_speed=0)
 
 DriveToPointCommand (TankDrive &drive_sys, Feedback &feedback, point_t point, directionType dir, double max_speed=1, double end_speed=0)
 
bool run () override
 

Detailed Description

AutoCommand wrapper class for the drive_to_point function in the TankDrive class

Constructor & Destructor Documentation

◆ DriveToPointCommand() [1/2]

DriveToPointCommand::DriveToPointCommand ( TankDrive & drive_sys,
Feedback & feedback,
double x,
double y,
directionType dir,
double max_speed = 1,
double end_speed = 0 )

Construct a DriveForward Command

Parameters
drive_systhe drive system we are commanding
feedbackthe feedback controller we are using to execute the drive
xwhere to drive in the x dimension
ywhere to drive in the y dimension
dirthe direction to drive
max_speed0 -> 1 percentage of the drive systems speed to drive at

◆ DriveToPointCommand() [2/2]

DriveToPointCommand::DriveToPointCommand ( TankDrive & drive_sys,
Feedback & feedback,
point_t point,
directionType dir,
double max_speed = 1,
double end_speed = 0 )

Construct a DriveForward Command

Parameters
drive_systhe drive system we are commanding
feedbackthe feedback controller we are using to execute the drive
pointthe point to drive to
dirthe direction to drive
max_speed0 -> 1 percentage of the drive systems speed to drive at

Member Function Documentation

◆ run()

bool DriveToPointCommand::run ( )
override

Run drive_to_point Overrides run from AutoCommand

Returns
true when execution is complete, false otherwise

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