CTRE Phoenix 6 C++ 26.0.0-beta-1
Loading...
Searching...
No Matches
ctre::phoenix6::configs::ExternalTempConfigs Class Reference

Configs related to using an independent thermister for automatically disabling a motor when a threshold has been reached. More...

#include <ctre/phoenix6/configs/ExternalTempConfigs.hpp>

Inheritance diagram for ctre::phoenix6::configs::ExternalTempConfigs:
ctre::phoenix6::configs::ParentConfiguration ctre::phoenix6::ISerializable

Public Member Functions

constexpr ExternalTempConfigs ()=default
 
constexpr ExternalTempConfigsWithThermistorMaxTemperature (units::temperature::celsius_t newThermistorMaxTemperature)
 Modifies this configuration's ThermistorMaxTemperature parameter and returns itself for method-chaining and easier to use config API.
 
constexpr ExternalTempConfigsWithThermistorBeta (units::temperature::kelvin_t newThermistorBeta)
 Modifies this configuration's ThermistorBeta parameter and returns itself for method-chaining and easier to use config API.
 
constexpr ExternalTempConfigsWithThermistorR0 (units::impedance::kiloohm_t newThermistorR0)
 Modifies this configuration's ThermistorR0 parameter and returns itself for method-chaining and easier to use config API.
 
constexpr ExternalTempConfigsWithTempSensorRequired (signals::TempSensorRequiredValue newTempSensorRequired)
 Modifies this configuration's TempSensorRequired parameter and returns itself for method-chaining and easier to use config API.
 
std::string ToString () const override
 
std::string Serialize () const final
 
ctre::phoenix::StatusCode Deserialize (std::string const &to_deserialize) final
 
- Public Member Functions inherited from ctre::phoenix6::configs::ParentConfiguration
- Public Member Functions inherited from ctre::phoenix6::ISerializable

Public Attributes

units::temperature::celsius_t ThermistorMaxTemperature = 0_degC
 Threshold for thermal faulting a custom motor.
 
units::temperature::kelvin_t ThermistorBeta = 0_K
 Beta K value for the connected NTC thermistor.
 
units::impedance::kiloohm_t ThermistorR0 = 0_kOhm
 The thermistor resistance for the connected NTC thermistor as measured at 25'C.
 
signals::TempSensorRequiredValue TempSensorRequired = signals::TempSensorRequiredValue::Required
 Whether a temperature sensor should be required for motor control.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ExternalTempConfigs()

ctre::phoenix6::configs::ExternalTempConfigs::ExternalTempConfigs ( )
constexprdefault

Member Function Documentation

◆ Deserialize()

ctre::phoenix::StatusCode ctre::phoenix6::configs::ExternalTempConfigs::Deserialize ( std::string const & to_deserialize)
finalvirtual

◆ Serialize()

std::string ctre::phoenix6::configs::ExternalTempConfigs::Serialize ( ) const
finalvirtual

◆ ToString()

std::string ctre::phoenix6::configs::ExternalTempConfigs::ToString ( ) const
overridevirtual

◆ WithTempSensorRequired()

ExternalTempConfigs & ctre::phoenix6::configs::ExternalTempConfigs::WithTempSensorRequired ( signals::TempSensorRequiredValue newTempSensorRequired)
inlineconstexpr

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
newTempSensorRequiredParameter to modify
Returns
Itself

◆ WithThermistorBeta()

ExternalTempConfigs & ctre::phoenix6::configs::ExternalTempConfigs::WithThermistorBeta ( units::temperature::kelvin_t newThermistorBeta)
inlineconstexpr

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
newThermistorBetaParameter to modify
Returns
Itself

◆ WithThermistorMaxTemperature()

ExternalTempConfigs & ctre::phoenix6::configs::ExternalTempConfigs::WithThermistorMaxTemperature ( units::temperature::celsius_t newThermistorMaxTemperature)
inlineconstexpr

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
newThermistorMaxTemperatureParameter to modify
Returns
Itself

◆ WithThermistorR0()

ExternalTempConfigs & ctre::phoenix6::configs::ExternalTempConfigs::WithThermistorR0 ( units::impedance::kiloohm_t newThermistorR0)
inlineconstexpr

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
newThermistorR0Parameter to modify
Returns
Itself

Member Data Documentation

◆ TempSensorRequired

signals::TempSensorRequiredValue ctre::phoenix6::configs::ExternalTempConfigs::TempSensorRequired = signals::TempSensorRequiredValue::Required

Whether a temperature sensor should be required for motor control.

This configuration is ignored in FRC environments and defaults to Required.

◆ ThermistorBeta

units::temperature::kelvin_t ctre::phoenix6::configs::ExternalTempConfigs::ThermistorBeta = 0_K

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

◆ ThermistorMaxTemperature

units::temperature::celsius_t ctre::phoenix6::configs::ExternalTempConfigs::ThermistorMaxTemperature = 0_degC

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: ℃

◆ ThermistorR0

units::impedance::kiloohm_t ctre::phoenix6::configs::ExternalTempConfigs::ThermistorR0 = 0_kOhm

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

The documentation for this class was generated from the following file: