<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;

/**
 *
 * @author Tech
 */
public class AllStop extends CommandBase {

    public AllStop() {
        requires(gearShift); //requires all subsystems. forces them to stop what they are doing.
        requires(shooter);
        requires(ballIntake);
        requires(drive);       
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
    }

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

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
      drive.setLeftDrive(0);
      drive.setRightDrive(0);
      ballIntake.ballIntakeStop();
                                   //TODO: Stop all subsystems
    }

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

    // Called once after isFinished returns true
    protected void end() {
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run<commit_msg>All Stop update. The shooter will stop pulling back if it is pulling back, and the trigger will lock, preventing it from shooting.Public void shoot was renamed to triggerOut, to avoid confusion. Ryan should put more thought naming things. -JDubs<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.Solenoid;
import edu.wpi.first.wpilibj.Victor;

/**
 *
 * @author Tech
 */
public class AllStop extends CommandBase {

    public AllStop() {
        requires(gearShift); //requires all subsystems. forces them to stop what they are doing.
        requires(shooter);
        requires(ballIntake);
        requires(drive);       
        // Use requires() here to declare subsystem dependencies
        // eg. requires(chassis);
    }

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

    // Called repeatedly when this Command is scheduled to run
    protected void execute() {
      drive.setLeftDrive(0);
      drive.setRightDrive(0);
      ballIntake.ballIntakeStop();
      gearShift.gearLow();
      shooter.stopPull();
      shooter.triggerIn();//TODO: Stop all subsystems
    }

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

    // Called once after isFinished returns true
    protected void end() {
    }

    // Called when another command which requires one or more of the same
    // subsystems is scheduled to run
{'fraction_non_alphanumeric': 0.07947454844006568, 'fraction_numerical': 0.0013136288998357964, 'mean_word_length': 2.6435406698564594, '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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4737512', 'n_tokens_mistral': 814, 'n_tokens_neox': 768, 'n_words': 318}