<commit_before>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.commands;

import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.templates.RobotMap;

/**
 *
 * @author vignesh
 */
public class autoWinchCommand extends CommandBase {
    boolean finished = false;
    DigitalInput catapultSwitch = RobotMap.catapultSwitch;
    
    public autoWinchCommand() {
        requires(WinchSubsystem); 
        requires(PneumaticSubsystem);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
        WinchSubsystem.init();
        finished = false;
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        WinchSubsystem.winch();
	finished = catapultSwitch.get();
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return finished;
    }

    // Called once after isFinished returns true
    protected void end() {
        PneumaticSubsystem.closeLatch();
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
}
<commit_msg>Added openLatch to autoWinchCommand<commit_after>/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.wpi.first.wpilibj.templates.commands;

import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.templates.RobotMap;

/**
 *
 * @author vignesh
 */
public class autoWinchCommand extends CommandBase {
    boolean finished = false;
    DigitalInput catapultSwitch = RobotMap.catapultSwitch;
    
    public autoWinchCommand() {
        requires(WinchSubsystem); 
        requires(PneumaticSubsystem);
    }

    // Called just before this Command runs the first time
    protected void initialize() {
        WinchSubsystem.init();
        PneumaticSubsystem.openLatch();
        finished = false;
    }

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
        WinchSubsystem.winch();
	finished = catapultSwitch.get();
    }

    // Make this return true when this Command no longer needs to run execute()
    protected boolean isFinished() {
        return finished;
    }

    // Called once after isFinished returns true
    protected void end() {
        PneumaticSubsystem.closeLatch();
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
    protected void interrupted() {
    }
}

{'fraction_non_alphanumeric': 0.07918710581639804, 'fraction_numerical': 0.0, 'mean_word_length': 2.9433701657458564, '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': '4627324', 'n_tokens_mistral': 791, 'n_tokens_neox': 766, 'n_words': 260}