Class TorqueTimeout

java.lang.Object
org.texastorque.torquelib.control.TorqueTimeout

public final class TorqueTimeout extends Object
Controls code execution based on an action and a timeout.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TorqueTimeout(double timeout)
    Create a new TorqueTimeout and specify the timeout.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    calculate(boolean action)
    If action is true and it hasn't been true for longer than the timeout, return true.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TorqueTimeout

      public TorqueTimeout(double timeout)
      Create a new TorqueTimeout and specify the timeout.
      Parameters:
      timeout - The timeout in seconds.
  • Method Details

    • calculate

      public final boolean calculate(boolean action)
      If action is true and it hasn't been true for longer than the timeout, return true.
      Parameters:
      action - The condition to check.