Class ExternalTempConfigs

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

public class ExternalTempConfigs extends Object implements ParentConfiguration, Cloneable
Configs related to using an independent thermister for automatically disabling a motor when a threshold has been reached.

Configs are only used when Motor Arrangement is set to Custom Brushless Motor or Brushed. Note this feature will only work device is not FRC-Locked.

Users are responsible for ensuring that these configs are accurate to the motor. CTR Electronics is not responsible for damage caused by an incorrect custom motor configuration.

  • Field Details

    • ThermistorMaxTemperature

      public double ThermistorMaxTemperature
      Threshold for thermal faulting a custom motor.

      The motor controller will fault if the connected motor thermistor exceeds this value.

      • Minimum Value: 0
      • Maximum Value: 150
      • Default Value: 0
      • Units: ℃
    • ThermistorBeta

      public double ThermistorBeta
      Beta K value for the connected NTC thermistor. This can usually be determined by consulting the motor manufacturer data sheet.
      • Minimum Value: 0
      • Maximum Value: 8000
      • Default Value: 0
      • Units: K
    • ThermistorR0

      public double ThermistorR0
      The thermistor resistance for the connected NTC thermistor as measured at 25'C. This can usually be determined by consulting the motor manufacturer data sheet.
      • Minimum Value: 0
      • Maximum Value: 400
      • Default Value: 0
      • Units: kOhm
    • TempSensorRequired

      public TempSensorRequiredValue TempSensorRequired
      Whether a temperature sensor should be required for motor control. This configuration is ignored in FRC environments and defaults to Required.
  • Constructor Details

    • ExternalTempConfigs

      public ExternalTempConfigs()
  • Method Details

    • withThermistorMaxTemperature

      public final ExternalTempConfigs withThermistorMaxTemperature(double newThermistorMaxTemperature)
      Modifies this configuration's ThermistorMaxTemperature parameter and returns itself for method-chaining and easier to use config API.

      Threshold for thermal faulting a custom motor.

      The motor controller will fault if the connected motor thermistor exceeds this value.

      • Minimum Value: 0
      • Maximum Value: 150
      • Default Value: 0
      • Units: ℃
      Parameters:
      newThermistorMaxTemperature - Parameter to modify
      Returns:
      Itself
    • withThermistorMaxTemperature

      public final ExternalTempConfigs withThermistorMaxTemperature(Temperature newThermistorMaxTemperature)
      Modifies this configuration's ThermistorMaxTemperature parameter and returns itself for method-chaining and easier to use config API.

      Threshold for thermal faulting a custom motor.

      The motor controller will fault if the connected motor thermistor exceeds this value.

      • Minimum Value: 0
      • Maximum Value: 150
      • Default Value: 0
      • Units: ℃
      Parameters:
      newThermistorMaxTemperature - Parameter to modify
      Returns:
      Itself
    • getThermistorMaxTemperatureMeasure

      public final Temperature getThermistorMaxTemperatureMeasure()
      Helper method to get this configuration's ThermistorMaxTemperature parameter converted to a unit type. If not using the Java units library, ThermistorMaxTemperature can be accessed directly instead.

      Threshold for thermal faulting a custom motor.

      The motor controller will fault if the connected motor thermistor exceeds this value.

      • Minimum Value: 0
      • Maximum Value: 150
      • Default Value: 0
      • Units: ℃
      Returns:
      ThermistorMaxTemperature
    • withThermistorBeta

      public final ExternalTempConfigs withThermistorBeta(double newThermistorBeta)
      Modifies this configuration's ThermistorBeta parameter and returns itself for method-chaining and easier to use config API.

      Beta K value for the connected NTC thermistor. This can usually be determined by consulting the motor manufacturer data sheet.

      • Minimum Value: 0
      • Maximum Value: 8000
      • Default Value: 0
      • Units: K
      Parameters:
      newThermistorBeta - Parameter to modify
      Returns:
      Itself
    • withThermistorBeta

      public final ExternalTempConfigs withThermistorBeta(Temperature newThermistorBeta)
      Modifies this configuration's ThermistorBeta parameter and returns itself for method-chaining and easier to use config API.

      Beta K value for the connected NTC thermistor. This can usually be determined by consulting the motor manufacturer data sheet.

      • Minimum Value: 0
      • Maximum Value: 8000
      • Default Value: 0
      • Units: K
      Parameters:
      newThermistorBeta - Parameter to modify
      Returns:
      Itself
    • getThermistorBetaMeasure

      public final Temperature getThermistorBetaMeasure()
      Helper method to get this configuration's ThermistorBeta parameter converted to a unit type. If not using the Java units library, ThermistorBeta can be accessed directly instead.

      Beta K value for the connected NTC thermistor. This can usually be determined by consulting the motor manufacturer data sheet.

      • Minimum Value: 0
      • Maximum Value: 8000
      • Default Value: 0
      • Units: K
      Returns:
      ThermistorBeta
    • withThermistorR0

      public final ExternalTempConfigs withThermistorR0(double newThermistorR0)
      Modifies this configuration's ThermistorR0 parameter and returns itself for method-chaining and easier to use config API.

      The thermistor resistance for the connected NTC thermistor as measured at 25'C. This can usually be determined by consulting the motor manufacturer data sheet.

      • Minimum Value: 0
      • Maximum Value: 400
      • Default Value: 0
      • Units: kOhm
      Parameters:
      newThermistorR0 - Parameter to modify
      Returns:
      Itself
    • withThermistorR0

      public final ExternalTempConfigs withThermistorR0(Resistance newThermistorR0)
      Modifies this configuration's ThermistorR0 parameter and returns itself for method-chaining and easier to use config API.

      The thermistor resistance for the connected NTC thermistor as measured at 25'C. This can usually be determined by consulting the motor manufacturer data sheet.

      • Minimum Value: 0
      • Maximum Value: 400
      • Default Value: 0
      • Units: kOhm
      Parameters:
      newThermistorR0 - Parameter to modify
      Returns:
      Itself
    • getThermistorR0Measure

      public final Resistance getThermistorR0Measure()
      Helper method to get this configuration's ThermistorR0 parameter converted to a unit type. If not using the Java units library, ThermistorR0 can be accessed directly instead.

      The thermistor resistance for the connected NTC thermistor as measured at 25'C. This can usually be determined by consulting the motor manufacturer data sheet.

      • Minimum Value: 0
      • Maximum Value: 400
      • Default Value: 0
      • Units: kOhm
      Returns:
      ThermistorR0
    • withTempSensorRequired

      public final ExternalTempConfigs withTempSensorRequired(TempSensorRequiredValue newTempSensorRequired)
      Modifies this configuration's TempSensorRequired parameter and returns itself for method-chaining and easier to use config API.

      Whether a temperature sensor should be required for motor control. This configuration is ignored in FRC environments and defaults to Required.

      Parameters:
      newTempSensorRequired - 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 ParentConfiguration
      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
      Parameters:
      to_deserialize - The serialized configuration
      Returns:
      Return code of the deserialize method
    • clone

      public ExternalTempConfigs clone()
      Overrides:
      clone in class Object