HardwareLimitSwitchConfigs Class

Configs that change how the motor controller behaves under different limit switch statse.

Includes configs such as enabling limit switches, configuring the remote sensor ID, the source, and the position to set on limit.

Definition

Namespace: CTRE.Phoenix6.Configs
Assembly: Phoenix6 (in Phoenix6.dll) Version: 1.0.0
C#
public class HardwareLimitSwitchConfigs
Inheritance
Object    HardwareLimitSwitchConfigs

Constructors

HardwareLimitSwitchConfigsInitializes a new instance of the HardwareLimitSwitchConfigs class

Methods

Deserialize Deserialize string and put values into this object
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Serialize Serialize this object into a string
ToString Provides the string representation of this object
(Overrides ObjectToString)

Fields

ForwardLimitAutosetPositionEnable If enabled, the position is auto-set to a specific value, specified by ForwardLimitAutosetPositionValue
  • Default Value – False
ForwardLimitAutosetPositionValue The value to auto-set the position to. This has no effect if ForwardLimitAutosetPositionEnable is false.
  • Minimum Value – -3.4e+38
  • Maximum Value – 3.4e+38
  • Default Value – 0
  • Units – rotations
ForwardLimitEnable If enabled, motor output is set to neutral when forward limit switch is asseted and positive output is requested.
  • Default Value – True
ForwardLimitRemoteSensorID Device ID of the device if using remote limit switch features.
  • Minimum Value – 0
  • Maximum Value – 62
  • Default Value – 0
  • Units
ForwardLimitSource Determines where to poll the forward limit switch. This defaults to the limit switch pin on the limit switch connector.
ForwardLimitType Determines if limit is normally-open (default) or normally-closed.
ReverseLimitAutosetPositionEnable If enabled, the position is auto-set to a specific value, specified by ReverseLimitAutosetPositionValue
  • Default Value – False
ReverseLimitAutosetPositionValue The value to auto-set the position to. This has no effect if ReverseLimitAutosetPositionEnable is false.
  • Minimum Value – -3.4e+38
  • Maximum Value – 3.4e+38
  • Default Value – 0
  • Units – rotations
ReverseLimitEnable If enabled, motor output is set to neutral when reverse limit switch is asseted and positive output is requested.
  • Default Value – True
ReverseLimitRemoteSensorID Device ID of the device if using remote limit switch features.
  • Minimum Value – 0
  • Maximum Value – 62
  • Default Value – 0
  • Units
ReverseLimitSource Determines where to poll the reverse limit switch. This defaults to the limit switch pin on the limit switch connector.
ReverseLimitType Determines if limit is normally-open (default) or normally-closed.

See Also