Class TorqueTraversableRange

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

public final class TorqueTraversableRange extends Object
An implementation of the valueshifter used in some of the robots.ß
  • Constructor Summary

    Constructors
    Constructor
    Description
    TorqueTraversableRange(double value, double minimum, double maximum)
    Creates a new TorquevalueSettings object with default increment of 0.1.
    TorqueTraversableRange(double value, double minimum, double maximum, double increment)
    Creates a new TorquevalueSettings object.
  • Method Summary

    Modifier and Type
    Method
    Description
    final double
    get()
    Returns the current value setting.
    final double
    update(boolean up, boolean down, boolean min, boolean max)
    Updates (and optionally returns) the value setting based on the controller input.

    Methods inherited from class java.lang.Object

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

    • TorqueTraversableRange

      public TorqueTraversableRange(double value, double minimum, double maximum)
      Creates a new TorquevalueSettings object with default increment of 0.1.
      Parameters:
      value - The initial value setting.
      minimum - The maximum value setting.
      maximum - The minimum value setting.
    • TorqueTraversableRange

      public TorqueTraversableRange(double value, double minimum, double maximum, double increment)
      Creates a new TorquevalueSettings object.
      Parameters:
      value - The initial value setting.
      minimum - The maximum value setting.
      maximum - The minimum value setting.
      increment - The increment of the value settings.
  • Method Details

    • update

      public final double update(boolean up, boolean down, boolean min, boolean max)
      Updates (and optionally returns) the value setting based on the controller input.
      Parameters:
      up - The button mapped to incrementing value.
      down - The button mapped to decrementing value.
      min - The button mapped to setting value to minimum.
      max - The button mapped to setting value to maximum.
      Returns:
      The current value setting.
    • get

      public final double get()
      Returns the current value setting.
      Returns:
      Current value setting.