change playback method

This commit is contained in:
Cole Deck 2020-02-27 15:01:10 -06:00
parent 8a75f10c2f
commit 5e0a0ffd7d
5 changed files with 736 additions and 734 deletions

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -117,7 +117,8 @@ void autonomous(void) {
double pos = strtod(instructions.substr(0, y).c_str(), NULL);
instructions = instructions.substr(y + 1);
Controller1.Screen.print(vel);
LeftDriveSmart.rotateTo(pos, degrees, vel, velocityUnits::pct, false);
LeftDriveSmart.setVelocity(vel, percent);
LeftDriveSmart.startSpinTo(pos, degrees);
y = instructions.find(" ", 5);
vel = strtod(instructions.substr(0, y).c_str(), NULL);
@ -126,7 +127,8 @@ void autonomous(void) {
pos = strtod(instructions.substr(0, y).c_str(), NULL);
instructions = instructions.substr(y + 1);
Controller1.Screen.print(vel);
RightDriveSmart.rotateTo(pos, degrees, vel, velocityUnits::pct, false);
RightDriveSmart.setVelocity(vel, percent);
RightDriveSmart.startSpinTo(pos, degrees);
y = instructions.find(" ", 5);
vel = strtod(instructions.substr(0, y).c_str(), NULL);
@ -149,7 +151,7 @@ void autonomous(void) {
y = instructions.find(" ", 5);
pos = strtod(instructions.substr(0, y).c_str(), NULL);
TiltMotor.rotateTo(pos, degrees, vel, velocityUnits::pct, false);
wait(20, msec);
wait(10, msec);
}
ifs.close();
STOPCODE_DEBUG();