Package com.grt192.mechanism

Examples of com.grt192.mechanism.GRTRobotBase.tankDrive()


    }

    public void yAxisMoved(JoystickEvent e) {
        GRTRobotBase base = ((GRTRobotBase) getMechanism("RobotBase"));
        if (e.getSource().getId().equals("left")) {
            base.tankDrive(e.getValue(), base.getRightSpeed());

        } else if (e.getSource().getId().equals("right")) {
            base.tankDrive(base.getLeftSpeed(), e.getValue());
        }
    }
View Full Code Here


        GRTRobotBase base = ((GRTRobotBase) getMechanism("RobotBase"));
        if (e.getSource().getId().equals("left")) {
            base.tankDrive(e.getValue(), base.getRightSpeed());

        } else if (e.getSource().getId().equals("right")) {
            base.tankDrive(base.getLeftSpeed(), e.getValue());
        }
    }

    public void xAxisMoved(JoystickEvent e) {
    }
View Full Code Here

        GRTDriverStation ds = (GRTDriverStation) getMechanism("DriverStation");
        GRTBreakawayRobotBase rb =
                (GRTBreakawayRobotBase) getMechanism("RobotBase");
        switch (driveMode) {
            case GRTBreakawayRobotBase.TANK_DRIVE:
                rb.tankDrive(ds.getYLeftJoystick(), ds.getYRightJoystick());
                break;
        }
    }

}
View Full Code Here

            driveMode = GRTBreakawayRobotBase.TANK_DRIVE;
        }

        switch (driveMode) {
            case GRTBreakawayRobotBase.TANK_DRIVE:
                rb.tankDrive(ds.getYLeftJoystick(), -ds.getYRightJoystick());
                break;
            case GRTBreakawayRobotBase.CAR_DRIVE:
                rb.carDrive(ds.getXRightJoystick(),ds.getYRightJoystick(),
                        Math.abs(ds.getYRightJoystick()) < SPIN_THRESHOLD);
                break;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.