<commit_before>from wpilib.command.commandgroup import CommandGroup
from wpilib.command.waitcommand import WaitCommand

from commands.controlgearmech import ControlGearMech
from commands.drivetorod import DriveToRod
from commands.rotate import Rotate
from commands.setspeed import SetSpeed


class AutonomousProgram(CommandGroup):
    def __init__(self, mode):
        super().__init__('Autonomous Program')

        if mode == "left":
            self.addSequential(SetSpeed(-0.3, 0.5))
            self.addSequential(Rotate(-20))
            self.addSequential(SetSpeed(-0.3, 2.4))
            self.addSequential(Rotate(28))
            self.addSequential(DriveToRod(timeout=3.5))
            self.addSequential(ControlGearMech(False))
            self.addSequential(WaitCommand(8))
            self.addSequential(SetSpeed(0.3, 1))
            self.addParallel(ControlGearMech(True))
            self.addSequential(Rotate(-10))
            self.addSequential(SetSpeed(-0.5, 2))
        elif mode == "right":
            self.addSequential(SetSpeed(-0.3, 0.5))
            self.addSequential(Rotate(20))
            self.addSequential(SetSpeed(-0.3, 2.4))
            self.addSequential(Rotate(-28))
            self.addSequential(DriveToRod(timeout=3.5))
            self.addSequential(ControlGearMech(False))
            self.addSequential(WaitCommand(8))
            self.addSequential(SetSpeed(0.3, 1))
            self.addParallel(ControlGearMech(True))
            self.addSequential(Rotate(10))
            self.addSequential(SetSpeed(-0.5, 2))
        else:
            self.addSequential(DriveToRod(timeout=5))
            self.addSequential(ControlGearMech(False))
            self.addSequential(WaitCommand(8))
            self.addSequential(SetSpeed(0.3, 1))
            self.addParallel(ControlGearMech(True))
            self.addSequential(Rotate(60))
            self.addSequential(SetSpeed(-0.5, 1))
            self.addSequential(Rotate(-60))
            self.addSequential(SetSpeed(-0.5, 2))<commit_msg>don't open gear mech or back up during autonomous<commit_after>from wpilib.command.commandgroup import CommandGroup

from commands.drivetorod import DriveToRod
from commands.rotate import Rotate
from commands.setspeed import SetSpeed


class AutonomousProgram(CommandGroup):
    def __init__(self, mode):
        super().__init__('Autonomous Program')

        if mode == "left":
            self.addSequential(SetSpeed(-0.3, 0.5))
            self.addSequential(Rotate(-20))
            self.addSequential(SetSpeed(-0.3, 2.5))
            self.addSequential(Rotate(28))
            self.addSequential(DriveToRod(timeout=3.5))
            # self.addSequential(ControlGearMech(False))
            # self.addSequential(WaitCommand())
            # self.addSequential(SetSpeed(0.3, 0.1))
            # self.addSequential(WaitCommand(1))
            # self.addSequential(SetSpeed(0.3, 1))
            # self.addParallel(ControlGearMech(True))
            # self.addSequential(Rotate(-10))
            # self.addSequential(SetSpeed(-0.5, 2))
        elif mode == "right":
            self.addSequential(SetSpeed(-0.3, 0.5))
            self.addSequential(Rotate(20))
            self.addSequential(SetSpeed(-0.3, 2.5))
            self.addSequential(Rotate(-28))
            self.addSequential(DriveToRod(timeout=3.5))
            # self.addSequential(ControlGearMech(False))
            # self.addSequential(WaitCommand(0.5))
            # self.addSequential(SetSpeed(0.3, 0.1))
            # self.addSequential(WaitCommand(1))
            # self.addSequential(SetSpeed(0.3, 1))
            # self.addParallel(ControlGearMech(True))
            # self.addSequential(Rotate(10))
            # self.addSequential(SetSpeed(-0.5, 2))
        else:
            self.addSequential(DriveToRod(timeout=5))
            # self.addSequential(ControlGearMech(False))
            # self.addSequential(WaitCommand(0.5))
            # self.addSequential(SetSpeed(0.3, 0.1))
            # self.addSequential(WaitCommand(1))
            # self.addSequential(SetSpeed(0.3, 1))
            # self.addParallel(ControlGearMech(True))
            # self.addSequential(Rotate(60))
            # self.addSequential(SetSpeed(-0.5, 1))
            # self.addSequential(Rotate(-60))
            # self.addSequential(SetSpeed(-0.5, 2))
{'fraction_non_alphanumeric': 0.12323699421965317, 'fraction_numerical': 0.03190751445086705, 'mean_word_length': 2.4802896218825423, 'pattern_counts': {'":': 4, '<': 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': '4200319', 'n_tokens_mistral': 1397, 'n_tokens_neox': 1335, 'n_words': 168}