Class ExternalTempConfigs
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.public class ExternalTempConfigs : IParentConfiguration, ISerializable, ICloneable
- Inheritance
-
ExternalTempConfigs
- Implements
- Inherited Members
Fields
TempSensorRequired
Whether a temperature sensor should be required for motor control. This configuration is ignored in FRC environments and defaults to Required.
public TempSensorRequiredValue TempSensorRequired
Field Value
ThermistorBeta
Beta K value for the connected NTC thermistor. This can usually be determined by consulting the motor manufacturer data sheet.
- Minimum Value0
- Maximum Value8000
- Default Value0
- UnitsK
public double ThermistorBeta
Field Value
ThermistorMaxTemperature
Threshold for thermal faulting a custom motor.
The motor controller will fault if the connected motor thermistor exceeds this value.- Minimum Value0
- Maximum Value150
- Default Value0
- Units℃
public double ThermistorMaxTemperature
Field Value
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 Value0
- Maximum Value400
- Default Value0
- UnitskOhm
public double ThermistorR0
Field Value
Methods
Clone()
Creates a copy of this config group.
public ExternalTempConfigs Clone()
Returns
Deserialize(string)
Deserialize string and put values into this object
public StatusCode Deserialize(string to_deserialize)
Parameters
to_deserializestringString to deserialize
Returns
- StatusCode
OK if deserialization is OK
Serialize()
Serialize this object into a string
public string Serialize()
Returns
- string
This object's data serialized into a string
ToString()
Provides the string representation of this object
public override string ToString()
Returns
WithTempSensorRequired(TempSensorRequiredValue)
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.public ExternalTempConfigs WithTempSensorRequired(TempSensorRequiredValue newTempSensorRequired)
Parameters
newTempSensorRequiredTempSensorRequiredValueParameter to modify
Returns
- ExternalTempConfigs
Itself
WithThermistorBeta(double)
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 Value0
- Maximum Value8000
- Default Value0
- UnitsK
public ExternalTempConfigs WithThermistorBeta(double newThermistorBeta)
Parameters
newThermistorBetadoubleParameter to modify
Returns
- ExternalTempConfigs
Itself
WithThermistorMaxTemperature(double)
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 Value0
- Maximum Value150
- Default Value0
- Units℃
public ExternalTempConfigs WithThermistorMaxTemperature(double newThermistorMaxTemperature)
Parameters
newThermistorMaxTemperaturedoubleParameter to modify
Returns
- ExternalTempConfigs
Itself
WithThermistorR0(double)
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 Value0
- Maximum Value400
- Default Value0
- UnitskOhm
public ExternalTempConfigs WithThermistorR0(double newThermistorR0)
Parameters
newThermistorR0doubleParameter to modify
Returns
- ExternalTempConfigs
Itself