Class EmptyAnimation

java.lang.Object
com.ctre.phoenix6.controls.EmptyAnimation
All Implemented Interfaces:
ControlRequest, Cloneable

public final class EmptyAnimation extends Object implements ControlRequest, Cloneable
An empty animation, clearing any animation in the specified slot.
  • Field Details

    • Slot

      public int Slot
      The slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
    • UpdateFreqHz

      public double UpdateFreqHz
      The frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.

      If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.

  • Constructor Details

    • EmptyAnimation

      public EmptyAnimation(int Slot)
      An empty animation, clearing any animation in the specified slot.
      Parameters:
      Slot - The slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: ControlRequest
      Gets the name of this control request.
      Specified by:
      getName in interface ControlRequest
      Returns:
      Name of the control request
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • sendRequest

      public StatusCode sendRequest(CANBus network, int deviceHash)
      Description copied from interface: ControlRequest
      Sends the control request to the device. Users should call setControl() on the device instead.
      Specified by:
      sendRequest in interface ControlRequest
      Parameters:
      network - Device network
      deviceHash - Device hash
      Returns:
      Status code of sending the request
    • getControlInfo

      public Map<String,String> getControlInfo()
      Gets information about this control request.
      Specified by:
      getControlInfo in interface ControlRequest
      Returns:
      Map of control parameter names and corresponding applied values
    • withSlot

      public EmptyAnimation withSlot(int newSlot)
      Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to use request API.

      The slot of this animation, within [0, 7]. Each slot on the CANdle can store and run one animation.

      Parameters:
      newSlot - Parameter to modify
      Returns:
      Itself
    • withUpdateFreqHz

      public EmptyAnimation withUpdateFreqHz(double newUpdateFreqHz)
      Sets the frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.

      If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.

      Specified by:
      withUpdateFreqHz in interface ControlRequest
      Parameters:
      newUpdateFreqHz - Parameter to modify
      Returns:
      Itself
    • withUpdateFreqHz

      public EmptyAnimation withUpdateFreqHz(Frequency newUpdateFreqHz)
      Sets the frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.

      If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.

      Specified by:
      withUpdateFreqHz in interface ControlRequest
      Parameters:
      newUpdateFreqHz - Parameter to modify
      Returns:
      Itself
    • clone

      public EmptyAnimation clone()
      Overrides:
      clone in class Object