Class MotionMagicConfigs
- All Implemented Interfaces:
ParentConfiguration,ISerializable,Cloneable
Includes Velocity, Acceleration, Jerk, and Expo parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleThis is the target acceleration Motion Magic® based control modes are allowed to use.doubleThis is the maximum velocity Motion Magic® based control modes are allowed to use.doubleThis is the target kA used only by Motion Magic® Expo control modes.doubleThis is the target kV used only by Motion Magic® Expo control modes.doubleThis is the target jerk (acceleration derivative) Motion Magic® based control modes are allowed to use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()final StatusCodedeserialize(String to_deserialize) Take a string and deserialize it to this configuration group.final AngularAccelerationHelper method to get this configuration's MotionMagicAcceleration parameter converted to a unit type.final AngularVelocityHelper method to get this configuration's MotionMagicCruiseVelocity parameter converted to a unit type.Helper method to get this configuration's MotionMagicExpo_kA parameter converted to a unit type.final Per<VoltageUnit,AngularVelocityUnit> Helper method to get this configuration's MotionMagicExpo_kV parameter converted to a unit type.final Velocity<AngularAccelerationUnit>Helper method to get this configuration's MotionMagicJerk parameter converted to a unit type.final StringGet the serialized form of this configuration group.toString()final MotionMagicConfigswithMotionMagicAcceleration(double newMotionMagicAcceleration) Modifies this configuration's MotionMagicAcceleration parameter and returns itself for method-chaining and easier to use config API.final MotionMagicConfigswithMotionMagicAcceleration(AngularAcceleration newMotionMagicAcceleration) Modifies this configuration's MotionMagicAcceleration parameter and returns itself for method-chaining and easier to use config API.final MotionMagicConfigswithMotionMagicCruiseVelocity(double newMotionMagicCruiseVelocity) Modifies this configuration's MotionMagicCruiseVelocity parameter and returns itself for method-chaining and easier to use config API.final MotionMagicConfigswithMotionMagicCruiseVelocity(AngularVelocity newMotionMagicCruiseVelocity) Modifies this configuration's MotionMagicCruiseVelocity parameter and returns itself for method-chaining and easier to use config API.final MotionMagicConfigswithMotionMagicExpo_kA(double newMotionMagicExpo_kA) Modifies this configuration's MotionMagicExpo_kA parameter and returns itself for method-chaining and easier to use config API.final MotionMagicConfigswithMotionMagicExpo_kA(Per<VoltageUnit, AngularAccelerationUnit> newMotionMagicExpo_kA) Modifies this configuration's MotionMagicExpo_kA parameter and returns itself for method-chaining and easier to use config API.final MotionMagicConfigswithMotionMagicExpo_kV(double newMotionMagicExpo_kV) Modifies this configuration's MotionMagicExpo_kV parameter and returns itself for method-chaining and easier to use config API.final MotionMagicConfigswithMotionMagicExpo_kV(Per<VoltageUnit, AngularVelocityUnit> newMotionMagicExpo_kV) Modifies this configuration's MotionMagicExpo_kV parameter and returns itself for method-chaining and easier to use config API.final MotionMagicConfigswithMotionMagicJerk(double newMotionMagicJerk) Modifies this configuration's MotionMagicJerk parameter and returns itself for method-chaining and easier to use config API.final MotionMagicConfigswithMotionMagicJerk(Velocity<AngularAccelerationUnit> newMotionMagicJerk) Modifies this configuration's MotionMagicJerk parameter and returns itself for method-chaining and easier to use config API.
-
Field Details
-
MotionMagicCruiseVelocity
This is the maximum velocity Motion Magic® based control modes are allowed to use. Motion Magic® Velocity control modes do not use this config.When using Motion Magic® Expo control modes, setting this to 0 will allow the profile to run to the max possible velocity based on Expo_kV.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec
-
MotionMagicAcceleration
This is the target acceleration Motion Magic® based control modes are allowed to use. Motion Magic® Expo control modes do not use this config.- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec²
-
MotionMagicJerk
This is the target jerk (acceleration derivative) Motion Magic® based control modes are allowed to use. Motion Magic® Expo control modes do not use this config. This allows Motion Magic® to generate S-Curve profiles.Jerk is optional; if this is set to zero, then Motion Magic® will not apply a Jerk limit.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec³
-
MotionMagicExpo_kV
This is the target kV used only by Motion Magic® Expo control modes. Unlike the kV slot gain, this is always in units of V/rps.This represents the amount of voltage necessary to hold a velocity. In terms of the Motion Magic® Expo profile, a higher kV results in a slower maximum velocity.
- Minimum Value: 0.001
- Maximum Value: 100
- Default Value: 0.12
- Units: V/rps
-
MotionMagicExpo_kA
This is the target kA used only by Motion Magic® Expo control modes. Unlike the kA slot gain, this is always in units of V/rps².This represents the amount of voltage necessary to achieve an acceleration. In terms of the Motion Magic® Expo profile, a higher kA results in a slower acceleration.
- Minimum Value: 1e-05
- Maximum Value: 100
- Default Value: 0.1
- Units: V/rps²
-
-
Constructor Details
-
MotionMagicConfigs
public MotionMagicConfigs()
-
-
Method Details
-
withMotionMagicCruiseVelocity
Modifies this configuration's MotionMagicCruiseVelocity parameter and returns itself for method-chaining and easier to use config API.This is the maximum velocity Motion Magic® based control modes are allowed to use. Motion Magic® Velocity control modes do not use this config.
When using Motion Magic® Expo control modes, setting this to 0 will allow the profile to run to the max possible velocity based on Expo_kV.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec
- Parameters:
newMotionMagicCruiseVelocity- Parameter to modify- Returns:
- Itself
-
withMotionMagicCruiseVelocity
public final MotionMagicConfigs withMotionMagicCruiseVelocity(AngularVelocity newMotionMagicCruiseVelocity) Modifies this configuration's MotionMagicCruiseVelocity parameter and returns itself for method-chaining and easier to use config API.This is the maximum velocity Motion Magic® based control modes are allowed to use. Motion Magic® Velocity control modes do not use this config.
When using Motion Magic® Expo control modes, setting this to 0 will allow the profile to run to the max possible velocity based on Expo_kV.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec
- Parameters:
newMotionMagicCruiseVelocity- Parameter to modify- Returns:
- Itself
-
getMotionMagicCruiseVelocityMeasure
Helper method to get this configuration's MotionMagicCruiseVelocity parameter converted to a unit type. If not using the Java units library,MotionMagicCruiseVelocitycan be accessed directly instead.This is the maximum velocity Motion Magic® based control modes are allowed to use. Motion Magic® Velocity control modes do not use this config.
When using Motion Magic® Expo control modes, setting this to 0 will allow the profile to run to the max possible velocity based on Expo_kV.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec
- Returns:
- MotionMagicCruiseVelocity
-
withMotionMagicAcceleration
Modifies this configuration's MotionMagicAcceleration parameter and returns itself for method-chaining and easier to use config API.This is the target acceleration Motion Magic® based control modes are allowed to use. Motion Magic® Expo control modes do not use this config.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec²
- Parameters:
newMotionMagicAcceleration- Parameter to modify- Returns:
- Itself
-
withMotionMagicAcceleration
public final MotionMagicConfigs withMotionMagicAcceleration(AngularAcceleration newMotionMagicAcceleration) Modifies this configuration's MotionMagicAcceleration parameter and returns itself for method-chaining and easier to use config API.This is the target acceleration Motion Magic® based control modes are allowed to use. Motion Magic® Expo control modes do not use this config.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec²
- Parameters:
newMotionMagicAcceleration- Parameter to modify- Returns:
- Itself
-
getMotionMagicAccelerationMeasure
Helper method to get this configuration's MotionMagicAcceleration parameter converted to a unit type. If not using the Java units library,MotionMagicAccelerationcan be accessed directly instead.This is the target acceleration Motion Magic® based control modes are allowed to use. Motion Magic® Expo control modes do not use this config.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec²
- Returns:
- MotionMagicAcceleration
-
withMotionMagicJerk
Modifies this configuration's MotionMagicJerk parameter and returns itself for method-chaining and easier to use config API.This is the target jerk (acceleration derivative) Motion Magic® based control modes are allowed to use. Motion Magic® Expo control modes do not use this config. This allows Motion Magic® to generate S-Curve profiles.
Jerk is optional; if this is set to zero, then Motion Magic® will not apply a Jerk limit.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec³
- Parameters:
newMotionMagicJerk- Parameter to modify- Returns:
- Itself
-
withMotionMagicJerk
public final MotionMagicConfigs withMotionMagicJerk(Velocity<AngularAccelerationUnit> newMotionMagicJerk) Modifies this configuration's MotionMagicJerk parameter and returns itself for method-chaining and easier to use config API.This is the target jerk (acceleration derivative) Motion Magic® based control modes are allowed to use. Motion Magic® Expo control modes do not use this config. This allows Motion Magic® to generate S-Curve profiles.
Jerk is optional; if this is set to zero, then Motion Magic® will not apply a Jerk limit.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec³
- Parameters:
newMotionMagicJerk- Parameter to modify- Returns:
- Itself
-
getMotionMagicJerkMeasure
Helper method to get this configuration's MotionMagicJerk parameter converted to a unit type. If not using the Java units library,MotionMagicJerkcan be accessed directly instead.This is the target jerk (acceleration derivative) Motion Magic® based control modes are allowed to use. Motion Magic® Expo control modes do not use this config. This allows Motion Magic® to generate S-Curve profiles.
Jerk is optional; if this is set to zero, then Motion Magic® will not apply a Jerk limit.
- Minimum Value: 0
- Maximum Value: 9999
- Default Value: 0
- Units: rot per sec³
- Returns:
- MotionMagicJerk
-
withMotionMagicExpo_kV
Modifies this configuration's MotionMagicExpo_kV parameter and returns itself for method-chaining and easier to use config API.This is the target kV used only by Motion Magic® Expo control modes. Unlike the kV slot gain, this is always in units of V/rps.
This represents the amount of voltage necessary to hold a velocity. In terms of the Motion Magic® Expo profile, a higher kV results in a slower maximum velocity.
- Minimum Value: 0.001
- Maximum Value: 100
- Default Value: 0.12
- Units: V/rps
- Parameters:
newMotionMagicExpo_kV- Parameter to modify- Returns:
- Itself
-
withMotionMagicExpo_kV
public final MotionMagicConfigs withMotionMagicExpo_kV(Per<VoltageUnit, AngularVelocityUnit> newMotionMagicExpo_kV) Modifies this configuration's MotionMagicExpo_kV parameter and returns itself for method-chaining and easier to use config API.This is the target kV used only by Motion Magic® Expo control modes. Unlike the kV slot gain, this is always in units of V/rps.
This represents the amount of voltage necessary to hold a velocity. In terms of the Motion Magic® Expo profile, a higher kV results in a slower maximum velocity.
- Minimum Value: 0.001
- Maximum Value: 100
- Default Value: 0.12
- Units: V/rps
- Parameters:
newMotionMagicExpo_kV- Parameter to modify- Returns:
- Itself
-
getMotionMagicExpo_kVMeasure
Helper method to get this configuration's MotionMagicExpo_kV parameter converted to a unit type. If not using the Java units library,MotionMagicExpo_kVcan be accessed directly instead.This is the target kV used only by Motion Magic® Expo control modes. Unlike the kV slot gain, this is always in units of V/rps.
This represents the amount of voltage necessary to hold a velocity. In terms of the Motion Magic® Expo profile, a higher kV results in a slower maximum velocity.
- Minimum Value: 0.001
- Maximum Value: 100
- Default Value: 0.12
- Units: V/rps
- Returns:
- MotionMagicExpo_kV
-
withMotionMagicExpo_kA
Modifies this configuration's MotionMagicExpo_kA parameter and returns itself for method-chaining and easier to use config API.This is the target kA used only by Motion Magic® Expo control modes. Unlike the kA slot gain, this is always in units of V/rps².
This represents the amount of voltage necessary to achieve an acceleration. In terms of the Motion Magic® Expo profile, a higher kA results in a slower acceleration.
- Minimum Value: 1e-05
- Maximum Value: 100
- Default Value: 0.1
- Units: V/rps²
- Parameters:
newMotionMagicExpo_kA- Parameter to modify- Returns:
- Itself
-
withMotionMagicExpo_kA
public final MotionMagicConfigs withMotionMagicExpo_kA(Per<VoltageUnit, AngularAccelerationUnit> newMotionMagicExpo_kA) Modifies this configuration's MotionMagicExpo_kA parameter and returns itself for method-chaining and easier to use config API.This is the target kA used only by Motion Magic® Expo control modes. Unlike the kA slot gain, this is always in units of V/rps².
This represents the amount of voltage necessary to achieve an acceleration. In terms of the Motion Magic® Expo profile, a higher kA results in a slower acceleration.
- Minimum Value: 1e-05
- Maximum Value: 100
- Default Value: 0.1
- Units: V/rps²
- Parameters:
newMotionMagicExpo_kA- Parameter to modify- Returns:
- Itself
-
getMotionMagicExpo_kAMeasure
Helper method to get this configuration's MotionMagicExpo_kA parameter converted to a unit type. If not using the Java units library,MotionMagicExpo_kAcan be accessed directly instead.This is the target kA used only by Motion Magic® Expo control modes. Unlike the kA slot gain, this is always in units of V/rps².
This represents the amount of voltage necessary to achieve an acceleration. In terms of the Motion Magic® Expo profile, a higher kA results in a slower acceleration.
- Minimum Value: 1e-05
- Maximum Value: 100
- Default Value: 0.1
- Units: V/rps²
- Returns:
- MotionMagicExpo_kA
-
toString
-
serialize
Get the serialized form of this configuration group.- Specified by:
serializein interfaceISerializable- Returns:
- Serialized form of this config group
-
deserialize
Take a string and deserialize it to this configuration group.- Specified by:
deserializein interfaceParentConfiguration- Returns:
- Return code of the deserialize method
-
clone
-