Class ExternalTempConfigs
- All Implemented Interfaces:
ParentConfiguration, Cloneable
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 Summary
FieldsModifier and TypeFieldDescriptionWhether a temperature sensor should be required for motor control.doubleBeta K value for the connected NTC thermistor.doubleThreshold for thermal faulting a custom motor.doubleThe thermistor resistance for the connected NTC thermistor as measured at 25'C. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration group.final TemperatureHelper method to get this configuration's ThermistorBeta parameter converted to a unit type.final TemperatureHelper method to get this configuration's ThermistorMaxTemperature parameter converted to a unit type.final ResistanceHelper method to get this configuration's ThermistorR0 parameter converted to a unit type.final StringGet the serialized form of this configuration group.toString()final ExternalTempConfigswithTempSensorRequired(TempSensorRequiredValue newTempSensorRequired) Modifies this configuration's TempSensorRequired parameter and returns itself for method-chaining and easier to use config API.final ExternalTempConfigswithThermistorBeta(double newThermistorBeta) Modifies this configuration's ThermistorBeta parameter and returns itself for method-chaining and easier to use config API.final ExternalTempConfigswithThermistorBeta(Temperature newThermistorBeta) Modifies this configuration's ThermistorBeta parameter and returns itself for method-chaining and easier to use config API.final ExternalTempConfigswithThermistorMaxTemperature(double newThermistorMaxTemperature) Modifies this configuration's ThermistorMaxTemperature parameter and returns itself for method-chaining and easier to use config API.final ExternalTempConfigswithThermistorMaxTemperature(Temperature newThermistorMaxTemperature) Modifies this configuration's ThermistorMaxTemperature parameter and returns itself for method-chaining and easier to use config API.final ExternalTempConfigswithThermistorR0(double newThermistorR0) Modifies this configuration's ThermistorR0 parameter and returns itself for method-chaining and easier to use config API.final ExternalTempConfigswithThermistorR0(Resistance newThermistorR0) Modifies this configuration's ThermistorR0 parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
ThermistorMaxTemperature
public double ThermistorMaxTemperatureThreshold 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 ThermistorBetaBeta 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 ThermistorR0The 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
Whether a temperature sensor should be required for motor control. This configuration is ignored in FRC environments and defaults to Required.- Default Value:
TempSensorRequiredValue.Required
- Default Value:
-
-
Constructor Details
-
ExternalTempConfigs
public ExternalTempConfigs()
-
-
Method Details
-
withThermistorMaxTemperature
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
Helper method to get this configuration's ThermistorMaxTemperature parameter converted to a unit type. If not using the Java units library,ThermistorMaxTemperaturecan 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
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
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
Helper method to get this configuration's ThermistorBeta parameter converted to a unit type. If not using the Java units library,ThermistorBetacan 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
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
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
Helper method to get this configuration's ThermistorR0 parameter converted to a unit type. If not using the Java units library,ThermistorR0can 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.
- Default Value:
TempSensorRequiredValue.Required
- Parameters:
newTempSensorRequired- Parameter to modify- Returns:
- Itself
- Default Value:
-
toString
-
serialize
Get the serialized form of this configuration group.- Specified by:
serializein interfaceParentConfiguration- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration group.- Specified by:
deserializein interfaceParentConfiguration- Parameters:
to_deserialize- The serialized configuration- Returns:
- Return code of the deserialize method
-
clone
-