<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.pvschools.robotics.javabot.practice.commands;

/**
 *
 * @author student
 */
public class MecanumDrive extends RoboCommand {
    
    boolean complete = false;
	
    public MecanumDrive()
    {
		requires(driveTrain);
    }

    protected void initialize() 
    {
        complete = false;
    }

    protected void execute() 
    { 
        double dampingFactor = oi.getDamping();       // Between 0 and 1; 0 = No damping 

        double calX     = oi.getDriveY(); 
        double calY     = oi.getDriveX(); 
        double calTwist = oi.getDriveTwist(); 

        calX     = dampingFactor*calX*calX*calX             + (1-dampingFactor)*calX; 
        calY     = dampingFactor*calY*calY*calY             + (1-dampingFactor)*calY; 
        calTwist = dampingFactor*calTwist*calTwist*calTwist + (1-dampingFactor)*calTwist; 

        driveTrain.driveCartesian(calX, calY, calTwist, 0.0); 

        complete = false; 
    }

    protected boolean isFinished() 
    {
        return complete;<commit_msg>fixed x and y<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.pvschools.robotics.javabot.practice.commands;

/**
 *
 * @author student
 */
public class MecanumDrive extends RoboCommand {
    
    boolean complete = false;
	
    public MecanumDrive()
    {
		requires(driveTrain);
    }

    protected void initialize() 
    {
        complete = false;
    }

    protected void execute() 
    { 
        double dampingFactor = oi.getDamping();       // Between 0 and 1; 0 = No damping 

        double calX     = oi.getDriveX();
        double calY     = oi.getDriveY(); 
        double calTwist = oi.getDriveTwist(); 

        calX     = dampingFactor*calX*calX*calX             + (1-dampingFactor)*calX; 
        calY     = dampingFactor*calY*calY*calY             + (1-dampingFactor)*calY; 
        calTwist = dampingFactor*calTwist*calTwist*calTwist + (1-dampingFactor)*calTwist; 

        driveTrain.driveCartesian(calX, calY, calTwist, 0.0); 

        complete = false; 
    }

    protected boolean isFinished() 
    {
        return complete;
{'fraction_non_alphanumeric': 0.10110864745011086, 'fraction_numerical': 0.007095343680709534, 'mean_word_length': 2.246043165467626, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '830637', 'n_tokens_mistral': 777, 'n_tokens_neox': 686, 'n_words': 156}