<commit_before>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.badrobots.y2012.technetium.commands;


/*
 * @author 1014 Programming Team
 */
public class AutoOrient extends CommandBase
{
    double distance = 0;

    public AutoOrient()
    {
       // requires(sensors);
        requires(driveTrain);
    }

    // Called just before this Command runs the first time
    protected void initialize() 
    {
        
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute()
    {
        distance = sensors.getDifferenceInSensors();

        if (distance > 0)
            driveTrain.autoMechanumDrive(0, 0, .5); //We must test
        
        else if (distance < 0)
            driveTrain.autoMechanumDrive(0, 0, -.5); //Testtt testt testtttt
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished()
    {
       // if (sensors.getDifferenceInSensorsFromWall(true) < 3) // difference is negligble<commit_msg>Changed ONE of Jon's if elses to be correct. Take that Jon<commit_after>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.badrobots.y2012.technetium.commands;


/*
 * @author 1014 Programming Team
 */
public class AutoOrient extends CommandBase
{
    double distance = 0;

    public AutoOrient()
    {
       // requires(sensors);
        requires(driveTrain);
    }

    // Called just before this Command runs the first time
    protected void initialize() 
    {
        
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute()
    {
        distance = sensors.getDifferenceInSensors();

        if (distance > 0)
            driveTrain.autoMechanumDrive(0, 0, .5); //We must test
        else if (distance < 0)
            driveTrain.autoMechanumDrive(0, 0, -.5); //Testtt testt testtttt
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished()
    {
       // if (sensors.getDifferenceInSensorsFromWall(true) < 3) // difference is negligble
{'fraction_non_alphanumeric': 0.08925318761384335, 'fraction_numerical': 0.01639344262295082, 'mean_word_length': 2.4328125, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5934230', 'n_tokens_mistral': 656, 'n_tokens_neox': 596, 'n_words': 210}