<commit_before>__author__ = 'nikolojedison'
from wpilib.command import Command

class SetMastSetpoint(Command):

    def __init__(self, robot, setpoint):
        super().__init__()
        self.robot = robot

        self.setpoint = setpoint
        self.requires(self.robot.mast)

    def initialize(self):
        self.robot.mast.enable()
        self.robot.mast.setSetpoint(self.setpoint)

    def execute(self):
        """Called repeatedly"""

    def isFinished(self):
        return self.robot.mast.onTarget() #Stay on target...

    def end(self):
        """Called once after isFinisherd returns true"""
        self.robot.mast.disable()

    def interrupted(self):
        """Called when another thing which requires one or more of the same subsyses is
        scheduled to run"""
        self.end()
<commit_msg>Added timeouts so we don't burn any more motors.<commit_after>__author__ = 'nikolojedison'
from wpilib.command import Command

class SetMastSetpoint(Command):

    def __init__(self, robot, setpoint):
        super().__init__()
        self.robot = robot
        self.setTimeout(5)

        self.setpoint = setpoint
        self.requires(self.robot.mast)

    def initialize(self):
        self.robot.mast.enable()
        self.robot.mast.setSetpoint(self.setpoint)

    def execute(self):
        """Called repeatedly"""

    def isFinished(self):
        return self.robot.mast.onTarget() or self.isTimedOut() #Stay on target...

    def end(self):
        """Called once after isFinisherd returns true"""
        self.robot.mast.disable()

    def interrupted(self):
        """Called when another thing which requires one or more of the same subsyses is
        scheduled to run"""
        self.end()

{'fraction_non_alphanumeric': 0.10885929357266937, 'fraction_numerical': 0.0005790387955993051, 'mean_word_length': 2.653276955602537, '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': '4912255', 'n_tokens_mistral': 526, 'n_tokens_neox': 513, 'n_words': 135}