Class TimedCommand

    • Constructor Detail

      • TimedCommand

        public TimedCommand​(String name,
                            double timeout)
        Instantiates a TimedCommand with the given name and timeout.
        Parameters:
        name - the name of the command
        timeout - the time the command takes to run (seconds)
      • TimedCommand

        public TimedCommand​(double timeout)
        Instantiates a TimedCommand with the given timeout.
        Parameters:
        timeout - the time the command takes to run (seconds)
      • TimedCommand

        public TimedCommand​(String name,
                            double timeout,
                            Subsystem subsystem)
        Instantiates a TimedCommand with the given name and timeout.
        Parameters:
        name - the name of the command
        timeout - the time the command takes to run (seconds)
        subsystem - the subsystem that this command requires
      • TimedCommand

        public TimedCommand​(double timeout,
                            Subsystem subsystem)
        Instantiates a TimedCommand with the given timeout.
        Parameters:
        timeout - the time the command takes to run (seconds)
        subsystem - the subsystem that this command requires
    • Method Detail

      • isFinished

        protected boolean isFinished()
        Ends command when timed out.
        Specified by:
        isFinished in class Command
        Returns:
        whether this command is finished.
        See Also:
        isTimedOut()