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