MagnetSensorConfigs Class

Configs that affect the magnet sensor and how to interpret it.

Includes sensor range and other configs related to sensor.

Definition

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

Constructors

MagnetSensorConfigsInitializes a new instance of the MagnetSensorConfigs 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

AbsoluteSensorRange The range of the absolute sensor, either [0, 1) or [-0.5, 0.5).
MagnetOffset This offset is added to the reported position, allowing the application to trim the zero position. When set to the default value of zero, position reports zero when magnet north pole aligns with the LED.
  • Minimum Value – -1
  • Maximum Value – 1
  • Default Value – 0
  • Units – rotations
SensorDirection Direction of the sensor to determine positive facing the LED side of the CANcoder.

See Also