Class CoreCANcoder
- Direct Known Subclasses:
CANcoder
// Constants used in CANcoder construction final int kCANcoderId = 0; final String kCANcoderCANbus = "canivore"; // Construct the CANcoder CANcoder cancoder = new CANcoder(kCANcoderId, kCANcoderCANbus); // Configure the CANcoder for basic use CANcoderConfiguration configs = new CANcoderConfiguration(); // This CANcoder should report absolute position from [-0.5, 0.5) rotations, // with a 0.26 rotation offset, with clockwise being positive configs.MagnetSensor.AbsoluteSensorRange = AbsoluteSensorRange.Signed_PlusMinusHalf; configs.MountPose.MagnetOffset = 0.26; configs.MountPose.SensorDirection = SensorDirectionValue.Clockwise_Positive; // Write these configs to the CANcoder cancoder.getConfigurator().apply(configs); // Set the position to 0 rotations for initial use cancoder.setPosition(0); // Get Position and Velocity var position = cancoder.getPosition(); var velocity = cancoder.getVelocity(); // Refresh and print these values System.out.println("Position is " + position.refresh().toString()); System.out.println("Velocity is " + velocity.refresh().toString());
-
Nested Class Summary
Nested classes/interfaces inherited from class com.ctre.phoenix6.hardware.ParentDevice
ParentDevice.MapGenerator<T>
-
Field Summary
Fields inherited from class com.ctre.phoenix6.hardware.ParentDevice
_emptyControl, deviceIdentifier
-
Constructor Summary
ConstructorDescriptionCoreCANcoder
(int deviceId) Constructs a new CANcoder object.CoreCANcoder
(int deviceId, CANBus canbus) Constructs a new CANcoder object.CoreCANcoder
(int deviceId, String canbus) Constructs a new CANcoder object. -
Method Summary
Modifier and TypeMethodDescriptionClear sticky fault: The magnet distance is not correct or magnet is missingclearStickyFault_BadMagnet
(double timeoutSeconds) Clear sticky fault: The magnet distance is not correct or magnet is missingClear sticky fault: Device boot while detecting the enable signalclearStickyFault_BootDuringEnable
(double timeoutSeconds) Clear sticky fault: Device boot while detecting the enable signalClear sticky fault: Hardware fault occurredclearStickyFault_Hardware
(double timeoutSeconds) Clear sticky fault: Hardware fault occurredClear sticky fault: Device supply voltage dropped to near brownout levelsclearStickyFault_Undervoltage
(double timeoutSeconds) Clear sticky fault: Device supply voltage dropped to near brownout levelsClear sticky fault: An unlicensed feature is in use, device may not behave as expected.clearStickyFault_UnlicensedFeatureInUse
(double timeoutSeconds) Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.Clear the sticky faults in the device.clearStickyFaults
(double timeoutSeconds) Clear the sticky faults in the device.StatusSignal<edu.wpi.first.units.measure.Angle>
Absolute Position of the device.StatusSignal<edu.wpi.first.units.measure.Angle>
getAbsolutePosition
(boolean refresh) Absolute Position of the device.Gets the configurator to use with this device's configsThe magnet distance is not correct or magnet is missing Default Value: False Default Rates: CAN: 4.0 HzgetFault_BadMagnet
(boolean refresh) The magnet distance is not correct or magnet is missing Default Value: False Default Rates: CAN: 4.0 HzDevice boot while detecting the enable signal Default Value: False Default Rates: CAN: 4.0 HzgetFault_BootDuringEnable
(boolean refresh) Device boot while detecting the enable signal Default Value: False Default Rates: CAN: 4.0 HzHardware fault occurred Default Value: False Default Rates: CAN: 4.0 HzgetFault_Hardware
(boolean refresh) Hardware fault occurred Default Value: False Default Rates: CAN: 4.0 HzDevice supply voltage dropped to near brownout levels Default Value: False Default Rates: CAN: 4.0 HzgetFault_Undervoltage
(boolean refresh) Device supply voltage dropped to near brownout levels Default Value: False Default Rates: CAN: 4.0 HzAn unlicensed feature is in use, device may not behave as expected.getFault_UnlicensedFeatureInUse
(boolean refresh) An unlicensed feature is in use, device may not behave as expected.Integer representing all fault flags reported by the device.getFaultField
(boolean refresh) Integer representing all fault flags reported by the device.Whether the device is Phoenix Pro licensed.getIsProLicensed
(boolean refresh) Whether the device is Phoenix Pro licensed.Magnet health as measured by CANcoder.getMagnetHealth
(boolean refresh) Magnet health as measured by CANcoder.StatusSignal<edu.wpi.first.units.measure.Angle>
Position of the device.StatusSignal<edu.wpi.first.units.measure.Angle>
getPosition
(boolean refresh) Position of the device.StatusSignal<edu.wpi.first.units.measure.Angle>
The relative position reported by the CANcoder since boot.StatusSignal<edu.wpi.first.units.measure.Angle>
getPositionSinceBoot
(boolean refresh) The relative position reported by the CANcoder since boot.Get the simulation state for this device.The magnet distance is not correct or magnet is missing Default Value: False Default Rates: CAN: 4.0 HzgetStickyFault_BadMagnet
(boolean refresh) The magnet distance is not correct or magnet is missing Default Value: False Default Rates: CAN: 4.0 HzDevice boot while detecting the enable signal Default Value: False Default Rates: CAN: 4.0 HzgetStickyFault_BootDuringEnable
(boolean refresh) Device boot while detecting the enable signal Default Value: False Default Rates: CAN: 4.0 HzHardware fault occurred Default Value: False Default Rates: CAN: 4.0 HzgetStickyFault_Hardware
(boolean refresh) Hardware fault occurred Default Value: False Default Rates: CAN: 4.0 HzDevice supply voltage dropped to near brownout levels Default Value: False Default Rates: CAN: 4.0 HzgetStickyFault_Undervoltage
(boolean refresh) Device supply voltage dropped to near brownout levels Default Value: False Default Rates: CAN: 4.0 HzAn unlicensed feature is in use, device may not behave as expected.getStickyFault_UnlicensedFeatureInUse
(boolean refresh) An unlicensed feature is in use, device may not behave as expected.Integer representing all (persistent) sticky fault flags reported by the device.getStickyFaultField
(boolean refresh) Integer representing all (persistent) sticky fault flags reported by the device.StatusSignal<edu.wpi.first.units.measure.Voltage>
Measured supply voltage to the CANcoder.StatusSignal<edu.wpi.first.units.measure.Voltage>
getSupplyVoltage
(boolean refresh) Measured supply voltage to the CANcoder.StatusSignal<edu.wpi.first.units.measure.AngularVelocity>
The unfiltered velocity reported by CANcoder.StatusSignal<edu.wpi.first.units.measure.AngularVelocity>
getUnfilteredVelocity
(boolean refresh) The unfiltered velocity reported by CANcoder.StatusSignal<edu.wpi.first.units.measure.AngularVelocity>
Velocity of the device.StatusSignal<edu.wpi.first.units.measure.AngularVelocity>
getVelocity
(boolean refresh) Velocity of the device.Full Version of firmware in device.getVersion
(boolean refresh) Full Version of firmware in device.App Bugfix Version number.getVersionBugfix
(boolean refresh) App Bugfix Version number.App Build Version number.getVersionBuild
(boolean refresh) App Build Version number.App Major Version number.getVersionMajor
(boolean refresh) App Major Version number.App Minor Version number.getVersionMinor
(boolean refresh) App Minor Version number.setControl
(ControlRequest request) Control device with generic control request object.setPosition
(double newValue) Sets the current position of the device.setPosition
(double newValue, double timeoutSeconds) Sets the current position of the device.setPosition
(edu.wpi.first.units.measure.Angle newValue) Sets the current position of the device.setPosition
(edu.wpi.first.units.measure.Angle newValue, double timeoutSeconds) Sets the current position of the device.Methods inherited from class com.ctre.phoenix6.hardware.ParentDevice
getAppliedControl, getDeviceHash, getDeviceID, getNetwork, getResetOccurredChecker, hasResetOccurred, isConnected, isConnected, lookupStatusSignal, lookupStatusSignal, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilization, optimizeBusUtilizationForAll, optimizeBusUtilizationForAll, resetSignalFrequencies, resetSignalFrequencies, resetSignalFrequenciesForAll, setControlPrivate
-
Constructor Details
-
CoreCANcoder
Constructs a new CANcoder object.Constructs the device using the default CAN bus for the system:
- "rio" on roboRIO
- "can0" on Linux
- "*" on Windows
- Parameters:
deviceId
- ID of the device, as configured in Phoenix Tuner.
-
CoreCANcoder
Constructs a new CANcoder object.- Parameters:
deviceId
- ID of the device, as configured in Phoenix Tuner.canbus
- Name of the CAN bus this device is on. Possible CAN bus strings are:- "rio" for the native roboRIO CAN bus
- CANivore name or serial number
- SocketCAN interface (non-FRC Linux only)
- "*" for any CANivore seen by the program
- empty string (default) to select the default for the system:
- "rio" on roboRIO
- "can0" on Linux
- "*" on Windows
-
CoreCANcoder
Constructs a new CANcoder object.- Parameters:
deviceId
- ID of the device, as configured in Phoenix Tuner.canbus
- The CAN bus this device is on.
-
-
Method Details
-
getConfigurator
Gets the configurator to use with this device's configs- Returns:
- Configurator for this object
-
getSimState
Get the simulation state for this device.This function reuses an allocated simulation state object, so it is safe to call this function multiple times in a robot loop.
- Returns:
- Simulation state
-
getVersionMajor
App Major Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- VersionMajor Status Signal Object
-
getVersionMajor
App Major Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- VersionMajor Status Signal Object
-
getVersionMinor
App Minor Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- VersionMinor Status Signal Object
-
getVersionMinor
App Minor Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- VersionMinor Status Signal Object
-
getVersionBugfix
App Bugfix Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- VersionBugfix Status Signal Object
-
getVersionBugfix
App Bugfix Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- VersionBugfix Status Signal Object
-
getVersionBuild
App Build Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- VersionBuild Status Signal Object
-
getVersionBuild
App Build Version number.- Minimum Value: 0
- Maximum Value: 255
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- VersionBuild Status Signal Object
-
getVersion
Full Version of firmware in device. The format is a four byte value.- Minimum Value: 0
- Maximum Value: 4294967295
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Version Status Signal Object
-
getVersion
Full Version of firmware in device. The format is a four byte value.- Minimum Value: 0
- Maximum Value: 4294967295
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Version Status Signal Object
-
getFaultField
Integer representing all fault flags reported by the device.These are device specific and are not used directly in typical applications. Use the signal specific GetFault_*() methods instead.
- Minimum Value: 0
- Maximum Value: 4294967295
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- FaultField Status Signal Object
-
getFaultField
Integer representing all fault flags reported by the device.These are device specific and are not used directly in typical applications. Use the signal specific GetFault_*() methods instead.
- Minimum Value: 0
- Maximum Value: 4294967295
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- FaultField Status Signal Object
-
getStickyFaultField
Integer representing all (persistent) sticky fault flags reported by the device.These are device specific and are not used directly in typical applications. Use the signal specific GetStickyFault_*() methods instead.
- Minimum Value: 0
- Maximum Value: 4294967295
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFaultField Status Signal Object
-
getStickyFaultField
Integer representing all (persistent) sticky fault flags reported by the device.These are device specific and are not used directly in typical applications. Use the signal specific GetStickyFault_*() methods instead.
- Minimum Value: 0
- Maximum Value: 4294967295
- Default Value: 0
- Units:
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFaultField Status Signal Object
-
getVelocity
Velocity of the device.- Minimum Value: -512.0
- Maximum Value: 511.998046875
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- Velocity Status Signal Object
-
getVelocity
Velocity of the device.- Minimum Value: -512.0
- Maximum Value: 511.998046875
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Velocity Status Signal Object
-
getPosition
Position of the device. This is initialized to the absolute position on boot.- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- Position Status Signal Object
-
getPosition
Position of the device. This is initialized to the absolute position on boot.- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Position Status Signal Object
-
getAbsolutePosition
Absolute Position of the device. The possible range is documented below; however, the exact expected range is determined by the AbsoluteSensorDiscontinuityPoint. This position is only affected by the MagnetSensor configs.- Minimum Value: -1.0
- Maximum Value: 0.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- AbsolutePosition Status Signal Object
-
getAbsolutePosition
Absolute Position of the device. The possible range is documented below; however, the exact expected range is determined by the AbsoluteSensorDiscontinuityPoint. This position is only affected by the MagnetSensor configs.- Minimum Value: -1.0
- Maximum Value: 0.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 100.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- AbsolutePosition Status Signal Object
-
getUnfilteredVelocity
The unfiltered velocity reported by CANcoder.This is the unfiltered velocity reported by CANcoder. This signal does not use the fusing algorithm.
- Minimum Value: -8000.0
- Maximum Value: 7999.755859375
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 4.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- UnfilteredVelocity Status Signal Object
-
getUnfilteredVelocity
public StatusSignal<edu.wpi.first.units.measure.AngularVelocity> getUnfilteredVelocity(boolean refresh) The unfiltered velocity reported by CANcoder.This is the unfiltered velocity reported by CANcoder. This signal does not use the fusing algorithm.
- Minimum Value: -8000.0
- Maximum Value: 7999.755859375
- Default Value: 0
- Units: rotations per second
- CAN 2.0: 4.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- UnfilteredVelocity Status Signal Object
-
getPositionSinceBoot
The relative position reported by the CANcoder since boot.This is the total displacement reported by CANcoder since power up. This signal is relative and is not influenced by the fusing algorithm.
- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 4.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- PositionSinceBoot Status Signal Object
-
getPositionSinceBoot
The relative position reported by the CANcoder since boot.This is the total displacement reported by CANcoder since power up. This signal is relative and is not influenced by the fusing algorithm.
- Minimum Value: -16384.0
- Maximum Value: 16383.999755859375
- Default Value: 0
- Units: rotations
- CAN 2.0: 4.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- PositionSinceBoot Status Signal Object
-
getSupplyVoltage
Measured supply voltage to the CANcoder.- Minimum Value: 4
- Maximum Value: 16.75
- Default Value: 4
- Units: V
- CAN 2.0: 4.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- SupplyVoltage Status Signal Object
-
getSupplyVoltage
Measured supply voltage to the CANcoder.- Minimum Value: 4
- Maximum Value: 16.75
- Default Value: 4
- Units: V
- CAN 2.0: 4.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- SupplyVoltage Status Signal Object
-
getMagnetHealth
Magnet health as measured by CANcoder.Red indicates too close or too far, Orange is adequate but with reduced accuracy, green is ideal. Invalid means the accuracy cannot be determined. Default Rates:
- CAN 2.0: 4.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Returns:
- MagnetHealth Status Signal Object
-
getMagnetHealth
Magnet health as measured by CANcoder.Red indicates too close or too far, Orange is adequate but with reduced accuracy, green is ideal. Invalid means the accuracy cannot be determined. Default Rates:
- CAN 2.0: 4.0 Hz
- CAN FD: 100.0 Hz (TimeSynced with Pro)
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- MagnetHealth Status Signal Object
-
getIsProLicensed
Whether the device is Phoenix Pro licensed.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- IsProLicensed Status Signal Object
-
getIsProLicensed
Whether the device is Phoenix Pro licensed.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- IsProLicensed Status Signal Object
-
getFault_Hardware
Hardware fault occurred- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_Hardware Status Signal Object
-
getFault_Hardware
Hardware fault occurred- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_Hardware Status Signal Object
-
getStickyFault_Hardware
Hardware fault occurred- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_Hardware Status Signal Object
-
getStickyFault_Hardware
Hardware fault occurred- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_Hardware Status Signal Object
-
getFault_Undervoltage
Device supply voltage dropped to near brownout levels- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_Undervoltage Status Signal Object
-
getFault_Undervoltage
Device supply voltage dropped to near brownout levels- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_Undervoltage Status Signal Object
-
getStickyFault_Undervoltage
Device supply voltage dropped to near brownout levels- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_Undervoltage Status Signal Object
-
getStickyFault_Undervoltage
Device supply voltage dropped to near brownout levels- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_Undervoltage Status Signal Object
-
getFault_BootDuringEnable
Device boot while detecting the enable signal- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_BootDuringEnable Status Signal Object
-
getFault_BootDuringEnable
Device boot while detecting the enable signal- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_BootDuringEnable Status Signal Object
-
getStickyFault_BootDuringEnable
Device boot while detecting the enable signal- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_BootDuringEnable Status Signal Object
-
getStickyFault_BootDuringEnable
Device boot while detecting the enable signal- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_BootDuringEnable Status Signal Object
-
getFault_UnlicensedFeatureInUse
An unlicensed feature is in use, device may not behave as expected.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_UnlicensedFeatureInUse Status Signal Object
-
getFault_UnlicensedFeatureInUse
An unlicensed feature is in use, device may not behave as expected.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_UnlicensedFeatureInUse Status Signal Object
-
getStickyFault_UnlicensedFeatureInUse
An unlicensed feature is in use, device may not behave as expected.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_UnlicensedFeatureInUse Status Signal Object
-
getStickyFault_UnlicensedFeatureInUse
An unlicensed feature is in use, device may not behave as expected.- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_UnlicensedFeatureInUse Status Signal Object
-
getFault_BadMagnet
The magnet distance is not correct or magnet is missing- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- Fault_BadMagnet Status Signal Object
-
getFault_BadMagnet
The magnet distance is not correct or magnet is missing- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- Fault_BadMagnet Status Signal Object
-
getStickyFault_BadMagnet
The magnet distance is not correct or magnet is missing- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Returns:
- StickyFault_BadMagnet Status Signal Object
-
getStickyFault_BadMagnet
The magnet distance is not correct or magnet is missing- Default Value: False
- CAN: 4.0 Hz
This refreshes and returns a cached StatusSignal object.
- Parameters:
refresh
- Whether to refresh the StatusSignal before returning it; defaults to true- Returns:
- StickyFault_BadMagnet Status Signal Object
-
setControl
Control device with generic control request object.User must make sure the specified object is castable to a valid control request, otherwise this function will fail at run-time and return the NotSupported StatusCode
- Parameters:
request
- Control object to request of the device- Returns:
- Status Code of the request, 0 is OK
-
setPosition
Sets the current position of the device.This will wait up to 0.100 seconds (100ms) by default.
- Parameters:
newValue
- Value to set to. Units are in rotations.- Returns:
- StatusCode of the set command
-
setPosition
Sets the current position of the device.- 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
-
setPosition
Sets the current position of the device.This will wait up to 0.100 seconds (100ms) by default.
- Parameters:
newValue
- Value to set to. Units are in rotations.- Returns:
- StatusCode of the set command
-
setPosition
Sets the current position of the device.- 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 0.100 seconds (100ms) by default.
- 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.
- 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 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_Hardware
Clear sticky fault: Hardware fault occurred- 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 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_Undervoltage
Clear sticky fault: Device supply voltage dropped to near brownout levels- 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 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_BootDuringEnable
Clear sticky fault: Device boot while detecting the enable signal- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-
clearStickyFault_UnlicensedFeatureInUse
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.This will wait up to 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_UnlicensedFeatureInUse
Clear sticky fault: An unlicensed feature is in use, device may not behave as expected.- 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 0.100 seconds (100ms) by default.
- Returns:
- StatusCode of the set command
-
clearStickyFault_BadMagnet
Clear sticky fault: The magnet distance is not correct or magnet is missing- Parameters:
timeoutSeconds
- Maximum time to wait up to in seconds.- Returns:
- StatusCode of the set command
-