Class DifferentialStrictFollower
Follow the differential motor output of another Talon while ignoring the leader's invert setting.
If Talon is in torque control, the differential torque is copied - which will increase the total torque applied. If Talon is in duty cycle output control, the differential duty cycle is matched. If Talon is in voltage output control, the differential motor voltage is matched. Motor direction is strictly determined by the configured invert and not the leader. If you want motor direction to match or oppose the leader, use DifferentialFollower instead. The leader must enable its DifferentialOutput status signal. The update rate of the status signal determines the update rate of the follower's output and should be no slower than 20 Hz.public sealed class DifferentialStrictFollower : ControlRequest, ICloneable
- Inheritance
-
DifferentialStrictFollower
- Implements
- Inherited Members
Constructors
DifferentialStrictFollower(int)
Follow the differential motor output of another Talon while ignoring the leader's invert setting.
If Talon is in torque control, the differential torque is copied - which will increase the total torque applied. If Talon is in duty cycle output control, the differential duty cycle is matched. If Talon is in voltage output control, the differential motor voltage is matched. Motor direction is strictly determined by the configured invert and not the leader. If you want motor direction to match or oppose the leader, use DifferentialFollower instead. The leader must enable its DifferentialOutput status signal. The update rate of the status signal determines the update rate of the follower's output and should be no slower than 20 Hz. Device ID of the differential leader to follow.public DifferentialStrictFollower(int LeaderID)
Parameters
LeaderIDint
Fields
LeaderID
Device ID of the differential leader to follow.
public int LeaderID
Field Value
UpdateFreqHz
The frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.public double UpdateFreqHz
Field Value
Properties
Name
Name of this control request.
public string Name { get; }
Property Value
Methods
Clone()
Creates a copy of this control request.
public DifferentialStrictFollower Clone()
Returns
GetControlInfo()
Gets information about this control request.
public Dictionary<string, string> GetControlInfo()
Returns
- Dictionary<string, string>
Dictionary of control parameter names and corresponding applied values
SendRequest(string, uint)
Sends this request out over CAN bus to the device for the device to apply.
public StatusCode SendRequest(string network, uint deviceHash)
Parameters
Returns
- StatusCode
Status of the send operation
ToString()
Provides the string representation of this object.
public override string ToString()
Returns
WithLeaderID(int)
Modifies this Control Request's LeaderID parameter and returns itself for method-chaining and easier to use request API.
Device ID of the differential leader to follow.public DifferentialStrictFollower WithLeaderID(int newLeaderID)
Parameters
newLeaderIDintParameter to modify
Returns
- DifferentialStrictFollower
Itself
WithUpdateFreqHz(double)
Sets the frequency at which this control will update. This is designated in Hertz, with a minimum of 20 Hz (every 50 ms) and a maximum of 1000 Hz (every 1 ms). Some update frequencies are not supported and will be promoted up to the next highest supported frequency.
If this field is set to 0 Hz, the control request will be sent immediately as a one-shot frame. This may be useful for advanced applications that require outputs to be synchronized with data acquisition. In this case, we recommend not exceeding 50 ms between control calls.public DifferentialStrictFollower WithUpdateFreqHz(double newUpdateFreqHz)
Parameters
newUpdateFreqHzdoubleParameter to modify
Returns
- DifferentialStrictFollower
Itself