change playback method

master
Cole Deck 4 years ago
parent 8a75f10c2f
commit 5e0a0ffd7d

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

@ -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();

Loading…
Cancel
Save