Class CANcoderConfigurator
public class CANcoderConfigurator extends ParentConfigurator
CANcoder
-
Field Summary
-
Constructor Summary
Constructors Constructor Description CANcoderConfigurator(DeviceIdentifier id)
-
Method Summary
Modifier and Type Method Description StatusCode
apply(CANcoderConfiguration configs)
Applies the contents of the specified config to the device.StatusCode
apply(CANcoderConfiguration configs, double timeoutSeconds)
Applies the contents of the specified config to the device.StatusCode
apply(MagnetSensorConfigs configs)
Applies the contents of the specified config to the device.StatusCode
apply(MagnetSensorConfigs configs, double timeoutSeconds)
Applies the contents of the specified config to the device.StatusCode
clearStickyFault_BadMagnet()
Clear sticky fault: The magnet distance is not correct or magnet is missingStatusCode
clearStickyFault_BadMagnet(double timeoutSeconds)
Clear sticky fault: The magnet distance is not correct or magnet is missingStatusCode
clearStickyFault_BootDuringEnable()
Clear sticky fault: Device boot while detecting the enable signalStatusCode
clearStickyFault_BootDuringEnable(double timeoutSeconds)
Clear sticky fault: Device boot while detecting the enable signalStatusCode
clearStickyFault_Hardware()
Clear sticky fault: Hardware fault occurredStatusCode
clearStickyFault_Hardware(double timeoutSeconds)
Clear sticky fault: Hardware fault occurredStatusCode
clearStickyFault_Undervoltage()
Clear sticky fault: Device supply voltage dropped to near brownout levelsStatusCode
clearStickyFault_Undervoltage(double timeoutSeconds)
Clear sticky fault: Device supply voltage dropped to near brownout levelsStatusCode
clearStickyFaults()
Clear the sticky faults in the device.StatusCode
clearStickyFaults(double timeoutSeconds)
Clear the sticky faults in the device.StatusCode
refresh(CANcoderConfiguration configs)
Refreshes the values of the specified config group.StatusCode
refresh(CANcoderConfiguration configs, double timeoutSeconds)
Refreshes the values of the specified config group.StatusCode
refresh(MagnetSensorConfigs configs)
Refreshes the values of the specified config group.StatusCode
refresh(MagnetSensorConfigs configs, double timeoutSeconds)
Refreshes the values of the specified config group.StatusCode
setPosition(double newValue)
Sets the current position of the device.StatusCode
setPosition(double newValue, double timeoutSeconds)
Sets the current position of the device.Methods inherited from class com.ctre.phoenix6.configs.ParentConfigurator
getConfigsPrivate, setConfigsPrivate
-
Constructor Details
-
Method Details
-
refresh
Refreshes the values of the specified config group.This will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.Call to refresh the selected configs from the device.
- Parameters:
configs
- The configs to refresh- Returns:
- StatusCode of refreshing the configs
-
refresh
Refreshes the values of the specified config group.Call to refresh the selected configs from the device.
- Parameters:
configs
- The configs to refreshtimeoutSeconds
- Maximum amount of time to wait when performing configuration- Returns:
- StatusCode of refreshing the configs
-
apply
Applies the contents of the specified config to the device.This will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.Call to apply the selected configs.
- Parameters:
configs
- Configs to apply against.- Returns:
- StatusCode of the set command
-
apply
Applies the contents of the specified config to the device.Call to apply the selected configs.
- Parameters:
configs
- Configs to apply against.timeoutSeconds
- Maximum amount of time to wait when performing configuration- Returns:
- StatusCode of the set command
-
refresh
Refreshes the values of the specified config group.This will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.Call to refresh the selected configs from the device.
- Parameters:
configs
- The configs to refresh- Returns:
- StatusCode of refreshing the configs
-
refresh
Refreshes the values of the specified config group.Call to refresh the selected configs from the device.
- Parameters:
configs
- The configs to refreshtimeoutSeconds
- Maximum amount of time to wait when performing configuration- Returns:
- StatusCode of refreshing the configs
-
apply
Applies the contents of the specified config to the device.This will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.Call to apply the selected configs.
- Parameters:
configs
- Configs to apply against.- Returns:
- StatusCode of the set command
-
apply
Applies the contents of the specified config to the device.Call to apply the selected configs.
- Parameters:
configs
- Configs to apply against.timeoutSeconds
- Maximum amount of time to wait when performing configuration- Returns:
- StatusCode of the set command
-
setPosition
Sets the current position of the device.This will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Parameters:
newValue
- Value to set to. Units are in rotations.- Returns:
- StatusCode of the set command
-
setPosition
Sets the current position of the device.This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Parameters:
newValue
- Value to set to. Units are in rotations.timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFaults
Clear the sticky faults in the device.This typically has no impact on the device functionality. Instead, it just clears telemetry faults that are accessible via API and Tuner Self-Test.
This will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Returns:
- StatusCode of the set command
-
clearStickyFaults
Clear the sticky faults in the device.This typically has no impact on the device functionality. Instead, it just clears telemetry faults that are accessible via API and Tuner Self-Test.
This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_Hardware
Clear sticky fault: Hardware fault occurredThis will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Returns:
- StatusCode of the set command
-
clearStickyFault_Hardware
Clear sticky fault: Hardware fault occurredThis is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_Undervoltage
Clear sticky fault: Device supply voltage dropped to near brownout levelsThis will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Returns:
- StatusCode of the set command
-
clearStickyFault_Undervoltage
Clear sticky fault: Device supply voltage dropped to near brownout levelsThis is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_BootDuringEnable
Clear sticky fault: Device boot while detecting the enable signalThis will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Returns:
- StatusCode of the set command
-
clearStickyFault_BootDuringEnable
Clear sticky fault: Device boot while detecting the enable signalThis is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_BadMagnet
Clear sticky fault: The magnet distance is not correct or magnet is missingThis will wait up to
ParentConfigurator.DefaultTimeoutSeconds
.This is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Returns:
- StatusCode of the set command
-
clearStickyFault_BadMagnet
Clear sticky fault: The magnet distance is not correct or magnet is missingThis is available in the configurator in case the user wants to initialize their device entirely without passing a device reference down to the code that performs the initialization. In this case, the user passes down the configurator object and performs all the initialization code on the object.
- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-