Thanks
The team members of FRC Team 2220 would like to give a big thanks to all of the Sponsors, Mentors and Parents that make having this team possible.
Thank you!
Team Login
| Drive.cpp |
|
|
|
| Written by TarinB |
| Saturday, February 13 2010 16:39 |
|
/* BTdrive.cpp * contains methods for advanced drive operations i.e ramp-up * UPDATE: Ramp-up methods removed */
#include "BTDrive.h"
BTDrive::BTDrive(ControlBoard* control_board):RobotDrive(PORTS::LEFT_DRIVE_MOTOR, PORTS::RIGHT_DRIVE_MOTOR, 0.5) { myControlBoard = control_board; next_time = GetClock();
targetLeftSpeed = 0; targetRightSpeed = 0; currentLeftSpeed = 0; currentRightSpeed = 0; deltaLeftSpeed = 0; deltaRightSpeed = 0; actualLeftSpeed = 0; actualRightSpeed = 0; }
bool BTDrive::DoDrive(int algorithm, bool bAuto) { bool bValid = true; if (!bAuto) { targetLeftSpeed = myControlBoard->GetY(ControlBoard::LEFT); targetRightSpeed = myControlBoard->GetY(ControlBoard::RIGHT); } SetLeftRightMotorSpeeds(targetLeftSpeed * -1, targetRightSpeed * -1); return bValid; }
|










