changes from haunted
yea
This commit is contained in:
parent
a51bef34b5
commit
b15553abcd
@ -201,8 +201,8 @@ void Drive::arcade_standard(e_type stick_type, e_curve_type curve_type) {
|
|||||||
} else if (stick_type == SINGLE) {
|
} else if (stick_type == SINGLE) {
|
||||||
// Put the joysticks through the curve function
|
// Put the joysticks through the curve function
|
||||||
if (curve_type == DEFAULT) {
|
if (curve_type == DEFAULT) {
|
||||||
fwd_stick = left_curve_function(master.get_analog(ANALOG_RIGHT_Y));
|
fwd_stick = left_curve_function(master.get_analog(ANALOG_LEFT_Y));
|
||||||
turn_stick = right_curve_function(master.get_analog(ANALOG_RIGHT_X));
|
turn_stick = right_curve_function(master.get_analog(ANALOG_LEFT_X));
|
||||||
} else if (curve_type == LOGARITHMIC) {
|
} else if (curve_type == LOGARITHMIC) {
|
||||||
//fwd_stick = (master.get_analog(ANALOG_LEFT_Y) >= 1) ? 10
|
//fwd_stick = (master.get_analog(ANALOG_LEFT_Y) >= 1) ? 10
|
||||||
} else if (curve_type == SQRT) {
|
} else if (curve_type == SQRT) {
|
||||||
|
|||||||
@ -20,40 +20,46 @@ using namespace superstruct;
|
|||||||
|
|
||||||
void near_side() {
|
void near_side() {
|
||||||
// Score the triball preload
|
// Score the triball preload
|
||||||
driveSync(107, true);
|
toggleIntake(true);
|
||||||
// Go forward
|
driveSync(100, true);
|
||||||
|
turnSync(90);
|
||||||
// Get the furthest triball
|
|
||||||
driveSync(-38, true); // Move away from the goal
|
|
||||||
turnSync(-99); // Turn towards the triball against the barrier
|
|
||||||
driveSync(95, true); // Drive towards the triball
|
|
||||||
|
|
||||||
// Turn towards the goal, and score the triball.
|
toggleIntake(false);
|
||||||
driveSync(-10, true); // Move away from the point
|
pros::delay(50);
|
||||||
turnSync(15); // Turn towards the goal
|
driveSync(22, true);
|
||||||
driveSync(40, true); // Drive towards the goal and score the triball
|
driveSync(-22, true);
|
||||||
leftSwing(60);
|
|
||||||
chassis.wait_drive();
|
|
||||||
|
|
||||||
//Drive backwards, turn to get the next triball off the line
|
turnSync(-120);
|
||||||
driveSync(-48, true); // Move away from the goal towards the nearest triball
|
driveSync(48.5, true);
|
||||||
turnSync(-90); // Turn to the triball and intake
|
pros::delay(150);
|
||||||
driveSync(12, true);
|
toggleIntake(true);
|
||||||
|
pros::delay(100);
|
||||||
|
|
||||||
|
driveSync(-35, true);
|
||||||
|
turnSync(90);
|
||||||
|
|
||||||
|
pros::delay(100);
|
||||||
|
toggleIntake(false);
|
||||||
|
driveSync(55, true);
|
||||||
|
driveSync(-20, true);
|
||||||
|
|
||||||
|
//driveSync(100, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void far_side() {
|
void far_side() {
|
||||||
toggleIntake(true);
|
toggleIntake(true);
|
||||||
driveSync(60, true);
|
driveSync(100, true);
|
||||||
turnSync(-90);
|
turnSync(-90);
|
||||||
|
|
||||||
toggleIntake(false);
|
toggleIntake(false);
|
||||||
driveSync(30, true);
|
pros::delay(250);
|
||||||
|
driveSync(31, true);
|
||||||
driveSync(-30, true);
|
driveSync(-30, true);
|
||||||
|
|
||||||
turnSync(-45);
|
turnSync(-160);
|
||||||
driveSync(100, true);
|
driveSync(125, true);
|
||||||
|
pros::delay(1000);
|
||||||
toggleRemovalMech(true);
|
toggleRemovalMech(true);
|
||||||
driveSync(-35, true);
|
driveSync(-35, true);
|
||||||
toggleRemovalMech(false);
|
toggleRemovalMech(false);
|
||||||
|
|||||||
@ -72,8 +72,8 @@ void opcontrol() {
|
|||||||
chassis.tank_control();
|
chassis.tank_control();
|
||||||
renu_control();
|
renu_control();
|
||||||
} else if (currentuser == RIA) {
|
} else if (currentuser == RIA) {
|
||||||
chassis.tank_control(); //
|
chassis.tank_control();
|
||||||
ria_control();
|
renu_control();
|
||||||
} else if (currentuser == CHRIS) {
|
} else if (currentuser == CHRIS) {
|
||||||
chassis.arcade_standard(ary::SINGLE, ary::DEFAULT);
|
chassis.arcade_standard(ary::SINGLE, ary::DEFAULT);
|
||||||
chris_control();
|
chris_control();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user