Table of Contents

Class NeutralOut

Namespace
CTRE.Phoenix6.Controls
Assembly
Phoenix6.Hardware.dll

Request neutral output of actuator. The applied brake type is determined by the NeutralMode configuration.

public sealed class NeutralOut : ControlRequest, ICloneable
Inheritance
NeutralOut
Implements
Inherited Members

Constructors

NeutralOut()

Request neutral output of actuator. The applied brake type is determined by the NeutralMode configuration.

public NeutralOut()

Fields

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

double

UseTimesync

Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.
public bool UseTimesync

Field Value

bool

Properties

Name

Name of this control request.

public string Name { get; }

Property Value

string

Methods

Clone()

Creates a copy of this control request.

public NeutralOut Clone()

Returns

NeutralOut

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

network string

Network to send request over

deviceHash uint

Device to send request to

Returns

StatusCode

Status of the send operation

ToString()

Provides the string representation of this object.

public override string ToString()

Returns

string

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 NeutralOut WithUpdateFreqHz(double newUpdateFreqHz)

Parameters

newUpdateFreqHz double

Parameter to modify

Returns

NeutralOut

Itself

WithUseTimesync(bool)

Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easier to use request API.

Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro and CANivore). This eliminates the impact of nondeterministic network delays in exchange for a larger but deterministic control latency.

This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs. Additionally, when this is enabled, the UpdateFreqHz of this request should be set to 0 Hz.
public NeutralOut WithUseTimesync(bool newUseTimesync)

Parameters

newUseTimesync bool

Parameter to modify

Returns

NeutralOut

Itself