java.lang.Object
org.firstinspires.ftc.teamcode.fy23.gamepad2.primitives.axes.LinearAxis
All Implemented Interfaces:
Axis

public class LinearAxis extends Object implements Axis
Represents an axis on a gamepad, including sticks or triggers, and directly reports the value.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.firstinspires.ftc.teamcode.fy23.gamepad2.primitives.Axis

    Axis.DoubleLambda
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pass in a lambda expression that returns the value of a Gamepad axis field: new LinearAxis( () -> gamepad.left_stick_x );
    LinearAxis(Axis.DoubleLambda axis, double scalingFactor)
    Specify a scaling factor (a number that the value should be multiplied by)
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    The value of an axis depends on the implementation and its parameters.

    Methods inherited from class java.lang.Object

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

    • LinearAxis

      public LinearAxis(Axis.DoubleLambda axis)
      Pass in a lambda expression that returns the value of a Gamepad axis field: new LinearAxis( () -> gamepad.left_stick_x );
    • LinearAxis

      public LinearAxis(Axis.DoubleLambda axis, double scalingFactor)
      Specify a scaling factor (a number that the value should be multiplied by)
  • Method Details

    • value

      public double value()
      Description copied from interface: Axis
      The value of an axis depends on the implementation and its parameters.
      Specified by:
      value in interface Axis