Class MountPoseConfigs
java.lang.Object
com.ctre.phoenix6.configs.MountPoseConfigs
- All Implemented Interfaces:
ParentConfiguration, Cloneable
Configs for Pigeon 2's Mount Pose configuration.
These configs allow the Pigeon2 to be mounted in whatever orientation that's desired and ensure the reported Yaw/Pitch/Roll is from the robot's reference.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThe mounting calibration pitch-component.doubleThe mounting calibration roll-component.doubleThe mounting calibration yaw-component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration group.final AngleHelper method to get this configuration's MountPosePitch parameter converted to a unit type.final AngleHelper method to get this configuration's MountPoseRoll parameter converted to a unit type.final AngleHelper method to get this configuration's MountPoseYaw parameter converted to a unit type.final StringGet the serialized form of this configuration group.toString()final MountPoseConfigswithMountPosePitch(double newMountPosePitch) Modifies this configuration's MountPosePitch parameter and returns itself for method-chaining and easier to use config API.final MountPoseConfigswithMountPosePitch(Angle newMountPosePitch) Modifies this configuration's MountPosePitch parameter and returns itself for method-chaining and easier to use config API.final MountPoseConfigswithMountPoseRoll(double newMountPoseRoll) Modifies this configuration's MountPoseRoll parameter and returns itself for method-chaining and easier to use config API.final MountPoseConfigswithMountPoseRoll(Angle newMountPoseRoll) Modifies this configuration's MountPoseRoll parameter and returns itself for method-chaining and easier to use config API.final MountPoseConfigswithMountPoseYaw(double newMountPoseYaw) Modifies this configuration's MountPoseYaw parameter and returns itself for method-chaining and easier to use config API.final MountPoseConfigswithMountPoseYaw(Angle newMountPoseYaw) Modifies this configuration's MountPoseYaw parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
MountPoseYaw
public double MountPoseYawThe mounting calibration yaw-component.- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
-
MountPosePitch
public double MountPosePitchThe mounting calibration pitch-component.- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
-
MountPoseRoll
public double MountPoseRollThe mounting calibration roll-component.- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
-
-
Constructor Details
-
MountPoseConfigs
public MountPoseConfigs()
-
-
Method Details
-
withMountPoseYaw
Modifies this configuration's MountPoseYaw parameter and returns itself for method-chaining and easier to use config API.The mounting calibration yaw-component.
- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
- Parameters:
newMountPoseYaw- Parameter to modify- Returns:
- Itself
-
withMountPoseYaw
Modifies this configuration's MountPoseYaw parameter and returns itself for method-chaining and easier to use config API.The mounting calibration yaw-component.
- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
- Parameters:
newMountPoseYaw- Parameter to modify- Returns:
- Itself
-
getMountPoseYawMeasure
Helper method to get this configuration's MountPoseYaw parameter converted to a unit type. If not using the Java units library,MountPoseYawcan be accessed directly instead.The mounting calibration yaw-component.
- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
- Returns:
- MountPoseYaw
-
withMountPosePitch
Modifies this configuration's MountPosePitch parameter and returns itself for method-chaining and easier to use config API.The mounting calibration pitch-component.
- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
- Parameters:
newMountPosePitch- Parameter to modify- Returns:
- Itself
-
withMountPosePitch
Modifies this configuration's MountPosePitch parameter and returns itself for method-chaining and easier to use config API.The mounting calibration pitch-component.
- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
- Parameters:
newMountPosePitch- Parameter to modify- Returns:
- Itself
-
getMountPosePitchMeasure
Helper method to get this configuration's MountPosePitch parameter converted to a unit type. If not using the Java units library,MountPosePitchcan be accessed directly instead.The mounting calibration pitch-component.
- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
- Returns:
- MountPosePitch
-
withMountPoseRoll
Modifies this configuration's MountPoseRoll parameter and returns itself for method-chaining and easier to use config API.The mounting calibration roll-component.
- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
- Parameters:
newMountPoseRoll- Parameter to modify- Returns:
- Itself
-
withMountPoseRoll
Modifies this configuration's MountPoseRoll parameter and returns itself for method-chaining and easier to use config API.The mounting calibration roll-component.
- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
- Parameters:
newMountPoseRoll- Parameter to modify- Returns:
- Itself
-
getMountPoseRollMeasure
Helper method to get this configuration's MountPoseRoll parameter converted to a unit type. If not using the Java units library,MountPoseRollcan be accessed directly instead.The mounting calibration roll-component.
- Minimum Value: -360
- Maximum Value: 360
- Default Value: 0
- Units: deg
- Returns:
- MountPoseRoll
-
toString
-
serialize
Get the serialized form of this configuration group.- Specified by:
serializein interfaceParentConfiguration- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration group.- Specified by:
deserializein interfaceParentConfiguration- Parameters:
to_deserialize- The serialized configuration- Returns:
- Return code of the deserialize method
-
clone
-