TeamB/src/main/java/utils/AlphaPantherOp.java
/**
     * Method for driving robot forwards or backwards
     *
     * @param driveDistanceMm Distance you want to drive forwards, in millimetres. Negative value with perform reverse drive
     * @param speed Speed as a percentage of maximum motor speed. Range: 0 < speed <= 1
     */
Method for driving robot forwards or backwards
@param driveDistanceMm Distance you want to drive forwards, in millimetres. Negative value with perform reverse drive
@param speed Speed as a percentage of maximum motor speed.
Method for driving robot forwards or backwards @param driveDistanceMm Distance you want to drive forwards in millimetres . Negative value with perform reverse drive @param speed Speed as a percentage of maximum motor speed .
protected void tankDrive(double driveDistanceMm, double speed)
    {
        if(speed <= 0) { return; }
        if(!opModeIsActive()) { return; }
        int lfTarget, rfTarget, lbTarget, rbTarget;
        lfTarget = lfWheel.getCurrentPosition() + (int) (driveDistanceMm * COUNTS_PER_MM);
        rfTarget = rfWheel.getCurrentPosition() + (int) (driveDistanceMm * COUNTS_PER_MM);
        lbTarget = lbWheel.getCurrentPosition() + (int) (driveDistanceMm * COUNTS_PER_MM);
        rbTarget = rbWheel.getCurrentPosition() + (int) (driveDistanceMm * COUNTS_PER_MM);
        encoderDrive(lfTarget, rfTarget, lbTarget, rbTarget, Math.min(speed, 1.0));
    }
protected void tankDrive ( double driveDistanceMm , double speed ) { if ( speed <= 0 ) { return ; } if ( ! opModeIsActive ( ) ) { return ; } int lfTarget , rfTarget , lbTarget , rbTarget ; lfTarget = lfWheel . getCurrentPosition ( ) + ( int ) ( driveDistanceMm * COUNTS_PER_MM ) ; rfTarget = rfWheel . getCurrentPosition ( ) + ( int ) ( driveDistanceMm * COUNTS_PER_MM ) ; lbTarget = lbWheel . getCurrentPosition ( ) + ( int ) ( driveDistanceMm * COUNTS_PER_MM ) ; rbTarget = rbWheel . getCurrentPosition ( ) + ( int ) ( driveDistanceMm * COUNTS_PER_MM ) ; encoderDrive ( lfTarget , rfTarget , lbTarget , rbTarget , Math . min ( speed , 1.0 ) ) ; }
Method for driving robot forwards or backwards
 @param driveDistanceMm Distance you want to drive forwards, in millimetres.
Method for driving robot forwards or backwards @param driveDistanceMm Distance you want to drive forwards in millimetres .
// Calculate new encoder count targets for drive motors