Package com.ctre.phoenixpro.configs
Class CANcoderConfiguration
java.lang.Object
com.ctre.phoenixpro.configs.CANcoderConfiguration
- All Implemented Interfaces:
ParentConfiguration,ISerializable
public class CANcoderConfiguration extends Object implements ParentConfiguration
Class for CANcoder, a CAN based magnetic encoder that provides absolute and
relative position along with filtered velocity.
This handles the configurations for the
CANcoder-
Field Summary
Fields Modifier and Type Field Description booleanFutureProofConfigsTrue if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.MagnetSensorConfigsMagnetSensorConfigs that affect the magnet sensor and how to interpret it. -
Constructor Summary
Constructors Constructor Description CANcoderConfiguration() -
Method Summary
Modifier and Type Method Description StatusCodedeserialize(String string)Take a string and deserialize it to this configurationStringserialize()Get the serialized form of this configurationStringtoString()
-
Field Details
-
FutureProofConfigs
True if we should factory default newer unsupported configs, false to leave newer unsupported configs alone.This flag addresses a corner case where the device may have firmware with newer configs that didn't exist when this version of the API was built. If this occurs and this flag is true, unsupported new configs will be factory defaulted to avoid unexpected behavior.
This is also the behavior in Phoenix 5, so this flag is defaulted to true to match.
-
MagnetSensor
Configs that affect the magnet sensor and how to interpret it.Includes sensor range and other configs related to sensor.
-
-
Constructor Details
-
Method Details
-
toString
-
serialize
Get the serialized form of this configuration- Specified by:
serializein interfaceISerializable- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration- Specified by:
deserializein interfaceParentConfiguration- Returns:
- Return code of the deserialize method
-