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 AbsoluteSensorRangeValueAbsoluteSensorRangeThe range of the absolute sensor, either [0, 1) or [-0.5, 0.5).doubleMagnetOffsetThis offset is added to the reported position, allowing the application to trim the zero position.SensorDirectionValueSensorDirectionDirection 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 StatusCodedeserialize(String string)Stringserialize()StringtoString()
-
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:
deserializein interfaceParentConfiguration
-
serialize
- Specified by:
serializein interfaceISerializable
-