Package com.ctre.phoenix6.configs
Class MagnetSensorConfigs
java.lang.Object
com.ctre.phoenix6.configs.MagnetSensorConfigs
- All Implemented Interfaces:
ParentConfiguration
,ISerializable
public class MagnetSensorConfigs extends Object implements ParentConfiguration
Configs that affect the magnet sensor and how to interpret it.
Includes sensor range and other configs related to sensor.
-
Field Summary
Fields Modifier and Type Field Description AbsoluteSensorRangeValue
AbsoluteSensorRange
The range of the absolute sensor, either [0, 1) or [-0.5, 0.5).double
MagnetOffset
This offset is added to the reported position, allowing the application to trim the zero position.SensorDirectionValue
SensorDirection
Direction of the sensor to determine positive facing the LED side of the CANcoder. -
Constructor Summary
Constructors Constructor Description MagnetSensorConfigs()
-
Method Summary
Modifier and Type Method Description StatusCode
deserialize(String string)
String
serialize()
String
toString()
-
Field Details
-
SensorDirection
Direction of the sensor to determine positive facing the LED side of the CANcoder. -
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
-
AbsoluteSensorRange
The range of the absolute sensor, either [0, 1) or [-0.5, 0.5).
-
-
Constructor Details
-
MagnetSensorConfigs
public MagnetSensorConfigs()
-
-
Method Details
-
toString
-
deserialize
- Specified by:
deserialize
in interfaceParentConfiguration
-
serialize
- Specified by:
serialize
in interfaceISerializable
-