Class TorqueRequestableTimeout

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

public final class TorqueRequestableTimeout extends Object
Request a time with set() and have calculate() return true until the requested time has elapsed from when it was set. Based on the legacy TimedTruthy.
  • Field Details

    • requested

      public double requested
    • last

      public double last
  • Constructor Details

    • TorqueRequestableTimeout

      public TorqueRequestableTimeout()
  • Method Details

    • set

      public final void set(double requested)
      Set a timeout and start the clock!
      Parameters:
      requested - The timeout requested.
    • calculate

      public final boolean calculate()
      Has the timeout yet to elapse?
      Returns:
      If the timeout has yet to elapse or not.