Class AudioConfigs

java.lang.Object
com.ctre.phoenix6.configs.AudioConfigs
All Implemented Interfaces:
ParentConfiguration, ISerializable, Cloneable

public class AudioConfigs extends Object implements ParentConfiguration, Cloneable
Configs that affect audible components of the device.

Includes configuration for the beep on boot.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    If true, the TalonFX will allow Orchestra and MusicTone requests during disabled state.
    boolean
    If true, the TalonFX will beep during boot-up.
    boolean
    If true, the TalonFX will beep during configuration API calls if device is disabled.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    deserialize(String to_deserialize)
    Take a string and deserialize it to this configuration group.
    final String
    Get the serialized form of this configuration group.
     
    withAllowMusicDurDisable(boolean newAllowMusicDurDisable)
    Modifies this configuration's AllowMusicDurDisable parameter and returns itself for method-chaining and easier to use config API.
    withBeepOnBoot(boolean newBeepOnBoot)
    Modifies this configuration's BeepOnBoot parameter and returns itself for method-chaining and easier to use config API.
    withBeepOnConfig(boolean newBeepOnConfig)
    Modifies this configuration's BeepOnConfig parameter and returns itself for method-chaining and easier to use config API.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • BeepOnBoot

      public boolean BeepOnBoot
      If true, the TalonFX will beep during boot-up. This is useful for general debugging, and defaults to true. If rotor is moving during boot-up, the beep will not occur regardless of this setting.
      • Default Value: True
    • BeepOnConfig

      public boolean BeepOnConfig
      If true, the TalonFX will beep during configuration API calls if device is disabled. This is useful for general debugging, and defaults to true. Note that if the rotor is moving, the beep will not occur regardless of this setting.
      • Default Value: True
    • AllowMusicDurDisable

      public boolean AllowMusicDurDisable
      If true, the TalonFX will allow Orchestra and MusicTone requests during disabled state. This can be used to address corner cases when music features are needed when disabled. This setting defaults to false. Note that if the rotor is moving, music features are always disabled regardless of this setting.
      • Default Value: False
  • Constructor Details

  • Method Details

    • withBeepOnBoot

      public final AudioConfigs withBeepOnBoot(boolean newBeepOnBoot)
      Modifies this configuration's BeepOnBoot parameter and returns itself for method-chaining and easier to use config API.

      If true, the TalonFX will beep during boot-up. This is useful for general debugging, and defaults to true. If rotor is moving during boot-up, the beep will not occur regardless of this setting.

      • Default Value: True
      Parameters:
      newBeepOnBoot - Parameter to modify
      Returns:
      Itself
    • withBeepOnConfig

      public final AudioConfigs withBeepOnConfig(boolean newBeepOnConfig)
      Modifies this configuration's BeepOnConfig parameter and returns itself for method-chaining and easier to use config API.

      If true, the TalonFX will beep during configuration API calls if device is disabled. This is useful for general debugging, and defaults to true. Note that if the rotor is moving, the beep will not occur regardless of this setting.

      • Default Value: True
      Parameters:
      newBeepOnConfig - Parameter to modify
      Returns:
      Itself
    • withAllowMusicDurDisable

      public final AudioConfigs withAllowMusicDurDisable(boolean newAllowMusicDurDisable)
      Modifies this configuration's AllowMusicDurDisable parameter and returns itself for method-chaining and easier to use config API.

      If true, the TalonFX will allow Orchestra and MusicTone requests during disabled state. This can be used to address corner cases when music features are needed when disabled. This setting defaults to false. Note that if the rotor is moving, music features are always disabled regardless of this setting.

      • Default Value: False
      Parameters:
      newAllowMusicDurDisable - Parameter to modify
      Returns:
      Itself
    • toString

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

      public final String serialize()
      Get the serialized form of this configuration group.
      Specified by:
      serialize in interface ISerializable
      Returns:
      Serialized form of this config group
    • deserialize

      public final StatusCode deserialize(String to_deserialize)
      Take a string and deserialize it to this configuration group.
      Specified by:
      deserialize in interface ParentConfiguration
      Returns:
      Return code of the deserialize method
    • clone

      public AudioConfigs clone()
      Overrides:
      clone in class Object