Show / Hide Table of Contents

Interface ICANSparkMaxDriver

Namespace: REV.SparkMax.Natives
Assembly: WPILibSharp.REV.SparkMax.dll
Syntax
public interface ICANSparkMaxDriver

Methods

| Improve this Doc View Source

c_SparkMax_BurnFlash(Void*)

Declaration
ErrorCode c_SparkMax_BurnFlash(void *handle)
Parameters
Type Name Description
Void* handle
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_ClearFaults(Void*)

Declaration
ErrorCode c_SparkMax_ClearFaults(void *handle)
Parameters
Type Name Description
Void* handle
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_Create(Int32, MotorType)

Declaration
void *c_SparkMax_Create(int deviceId, MotorType type)
Parameters
Type Name Description
Int32 deviceId
MotorType type
Returns
Type Description
Void*
| Improve this Doc View Source

c_SparkMax_Create_Inplace(Int32)

Declaration
void *c_SparkMax_Create_Inplace(int deviceId)
Parameters
Type Name Description
Int32 deviceId
Returns
Type Description
Void*
| Improve this Doc View Source

c_SparkMax_Destroy(Void*)

Declaration
void c_SparkMax_Destroy(void *handle)
Parameters
Type Name Description
Void* handle
| Improve this Doc View Source

c_SparkMax_DisableVoltageCompensation(Void*)

Declaration
ErrorCode c_SparkMax_DisableVoltageCompensation(void *handle)
Parameters
Type Name Description
Void* handle
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_EnableLimitSwitch(Void*, LimitDirection, Byte)

Declaration
ErrorCode c_SparkMax_EnableLimitSwitch(void *handle, LimitDirection sw, byte enable)
Parameters
Type Name Description
Void* handle
LimitDirection sw
Byte enable
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_EnableSoftLimit(Void*, LimitDirection, Byte)

Declaration
ErrorCode c_SparkMax_EnableSoftLimit(void *handle, LimitDirection dir, byte enable)
Parameters
Type Name Description
Void* handle
LimitDirection dir
Byte enable
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_EnableVoltageCompensation(Void*, Single)

Declaration
ErrorCode c_SparkMax_EnableVoltageCompensation(void *handle, float nominalVoltage)
Parameters
Type Name Description
Void* handle
Single nominalVoltage
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_FactoryWipe(Void*, Byte)

Declaration
ErrorCode c_SparkMax_FactoryWipe(void *handle, byte persist)
Parameters
Type Name Description
Void* handle
Byte persist
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GenerateError(Int32, ErrorCode)

Declaration
ErrorCode c_SparkMax_GenerateError(int deviceID, ErrorCode error)
Parameters
Type Name Description
Int32 deviceID
ErrorCode error
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAltEncoderAverageDepth(Void*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetAltEncoderAverageDepth(void *handle, uint *depth)
Parameters
Type Name Description
Void* handle
UInt32* depth
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAltEncoderCountsPerRevolution(Void*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetAltEncoderCountsPerRevolution(void *handle, uint *cpr)
Parameters
Type Name Description
Void* handle
UInt32* cpr
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAltEncoderInverted(Void*, Byte*)

Declaration
ErrorCode c_SparkMax_GetAltEncoderInverted(void *handle, byte *inverted)
Parameters
Type Name Description
Void* handle
Byte* inverted
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAltEncoderMeasurementPeriod(Void*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetAltEncoderMeasurementPeriod(void *handle, uint *samples)
Parameters
Type Name Description
Void* handle
UInt32* samples
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAltEncoderPosition(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAltEncoderPosition(void *handle, float *position)
Parameters
Type Name Description
Void* handle
Single* position
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAltEncoderPositionFactor(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAltEncoderPositionFactor(void *handle, float *conversion)
Parameters
Type Name Description
Void* handle
Single* conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAltEncoderVelocity(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAltEncoderVelocity(void *handle, float *velocity)
Parameters
Type Name Description
Void* handle
Single* velocity
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAltEncoderVelocityFactor(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAltEncoderVelocityFactor(void *handle, float *conversion)
Parameters
Type Name Description
Void* handle
Single* conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAnalogAverageDepth(Void*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetAnalogAverageDepth(void *handle, uint *depth)
Parameters
Type Name Description
Void* handle
UInt32* depth
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAnalogInverted(Void*, Byte*)

Declaration
ErrorCode c_SparkMax_GetAnalogInverted(void *handle, byte *inverted)
Parameters
Type Name Description
Void* handle
Byte* inverted
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAnalogMeasurementPeriod(Void*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetAnalogMeasurementPeriod(void *handle, uint *samples)
Parameters
Type Name Description
Void* handle
UInt32* samples
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAnalogMode(Void*, AnalogMode*)

Declaration
ErrorCode c_SparkMax_GetAnalogMode(void *handle, AnalogMode*mode)
Parameters
Type Name Description
Void* handle
AnalogMode* mode
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAnalogPosition(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAnalogPosition(void *handle, float *position)
Parameters
Type Name Description
Void* handle
Single* position
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAnalogPositionConversionFactor(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAnalogPositionConversionFactor(void *handle, float *conversion)
Parameters
Type Name Description
Void* handle
Single* conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAnalogVelocity(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAnalogVelocity(void *handle, float *velocity)
Parameters
Type Name Description
Void* handle
Single* velocity
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAnalogVelocityConversionFactor(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAnalogVelocityConversionFactor(void *handle, float *conversion)
Parameters
Type Name Description
Void* handle
Single* conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAnalogVoltage(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAnalogVoltage(void *handle, float *voltage)
Parameters
Type Name Description
Void* handle
Single* voltage
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAPIVersion()

Declaration
APIVersion c_SparkMax_GetAPIVersion()
Returns
Type Description
APIVersion
| Improve this Doc View Source

c_SparkMax_GetAppliedOutput(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetAppliedOutput(void *handle, float *appliedOutput)
Parameters
Type Name Description
Void* handle
Single* appliedOutput
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetAverageDepth(Void*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetAverageDepth(void *handle, uint *depth)
Parameters
Type Name Description
Void* handle
UInt32* depth
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetBusVoltage(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetBusVoltage(void *handle, float *busVoltage)
Parameters
Type Name Description
Void* handle
Single* busVoltage
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetClosedLoopRampRate(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetClosedLoopRampRate(void *handle, float *rate)
Parameters
Type Name Description
Void* handle
Single* rate
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetControlFramePeriod(Void*)

Declaration
int c_SparkMax_GetControlFramePeriod(void *handle)
Parameters
Type Name Description
Void* handle
Returns
Type Description
Int32
| Improve this Doc View Source

c_SparkMax_GetCountsPerRevolution(Void*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetCountsPerRevolution(void *handle, uint *cpr)
Parameters
Type Name Description
Void* handle
UInt32* cpr
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetD(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetD(void *handle, int slotID, float *gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetDataPortConfig(Void*, DataPortConfig*)

Declaration
ErrorCode c_SparkMax_GetDataPortConfig(void *handle, DataPortConfig*config)
Parameters
Type Name Description
Void* handle
DataPortConfig* config
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetDeviceId(Void*, Int32*)

Declaration
ErrorCode c_SparkMax_GetDeviceId(void *handle, int *deviceId)
Parameters
Type Name Description
Void* handle
Int32* deviceId
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetDFilter(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetDFilter(void *handle, int slotID, float *gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetDRVStatus(Void*, DRVStatus*)

Declaration
ErrorCode c_SparkMax_GetDRVStatus(void *handle, DRVStatus*drvStatus)
Parameters
Type Name Description
Void* handle
DRVStatus* drvStatus
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetEncoderInverted(Void*, Byte*)

Declaration
ErrorCode c_SparkMax_GetEncoderInverted(void *handle, byte *inverted)
Parameters
Type Name Description
Void* handle
Byte* inverted
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetEncoderPosition(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetEncoderPosition(void *handle, float *position)
Parameters
Type Name Description
Void* handle
Single* position
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetEncoderVelocity(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetEncoderVelocity(void *handle, float *velocity)
Parameters
Type Name Description
Void* handle
Single* velocity
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetFault(Void*, FaultID, Byte*)

Declaration
ErrorCode c_SparkMax_GetFault(void *handle, FaultID faultId, byte *fault)
Parameters
Type Name Description
Void* handle
FaultID faultId
Byte* fault
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetFaults(Void*, UInt16*)

Declaration
ErrorCode c_SparkMax_GetFaults(void *handle, ushort *faults)
Parameters
Type Name Description
Void* handle
UInt16* faults
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetFeedbackDeviceID(Void*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetFeedbackDeviceID(void *handle, uint *id)
Parameters
Type Name Description
Void* handle
UInt32* id
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetFF(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetFF(void *handle, int slotID, float *gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetFirmwareVersion(Void*, FirmwareVersion*)

Declaration
ErrorCode c_SparkMax_GetFirmwareVersion(void *handle, FirmwareVersion*fwVersion)
Parameters
Type Name Description
Void* handle
FirmwareVersion* fwVersion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetI(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetI(void *handle, int slotID, float *gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetIAccum(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetIAccum(void *handle, float *iAccum)
Parameters
Type Name Description
Void* handle
Single* iAccum
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetIdleMode(Void*, IdleMode*)

Declaration
ErrorCode c_SparkMax_GetIdleMode(void *handle, IdleMode*idlemode)
Parameters
Type Name Description
Void* handle
IdleMode* idlemode
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetIMaxAccum(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetIMaxAccum(void *handle, int slotID, float *iMaxAccum)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* iMaxAccum
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetInverted(Void*, Byte*)

Declaration
ErrorCode c_SparkMax_GetInverted(void *handle, byte *inverted)
Parameters
Type Name Description
Void* handle
Byte* inverted
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetIZone(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetIZone(void *handle, int slotID, float *IZone)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* IZone
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetLastError(Void*)

Declaration
ErrorCode c_SparkMax_GetLastError(void *handle)
Parameters
Type Name Description
Void* handle
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetLimitPolarity(Void*, LimitDirection, LimitPolarity*)

Declaration
ErrorCode c_SparkMax_GetLimitPolarity(void *handle, LimitDirection sw, LimitPolarity*polarity)
Parameters
Type Name Description
Void* handle
LimitDirection sw
LimitPolarity* polarity
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetLimitSwitch(Void*, LimitDirection, Byte*)

Declaration
ErrorCode c_SparkMax_GetLimitSwitch(void *handle, LimitDirection sw, byte *limit)
Parameters
Type Name Description
Void* handle
LimitDirection sw
Byte* limit
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetMeasurementPeriod(Void*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetMeasurementPeriod(void *handle, uint *samples)
Parameters
Type Name Description
Void* handle
UInt32* samples
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetMotorTemperature(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetMotorTemperature(void *handle, float *motorTemperature)
Parameters
Type Name Description
Void* handle
Single* motorTemperature
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetMotorType(Void*, MotorType*)

Declaration
ErrorCode c_SparkMax_GetMotorType(void *handle, MotorType*type)
Parameters
Type Name Description
Void* handle
MotorType* type
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetOpenLoopRampRate(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetOpenLoopRampRate(void *handle, float *rate)
Parameters
Type Name Description
Void* handle
Single* rate
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetOutputCurrent(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetOutputCurrent(void *handle, float *outputCurrent)
Parameters
Type Name Description
Void* handle
Single* outputCurrent
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetOutputMax(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetOutputMax(void *handle, int slotID, float *max)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* max
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetOutputMin(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetOutputMin(void *handle, int slotID, float *min)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* min
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetP(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetP(void *handle, int slotID, float *gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetParameterBool(Void*, ConfigParameter, Byte*)

Declaration
ErrorCode c_SparkMax_GetParameterBool(void *handle, ConfigParameter paramId, byte *value)
Parameters
Type Name Description
Void* handle
ConfigParameter paramId
Byte* value
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetParameterFloat32(Void*, ConfigParameter, Single*)

Declaration
ErrorCode c_SparkMax_GetParameterFloat32(void *handle, ConfigParameter paramId, float *value)
Parameters
Type Name Description
Void* handle
ConfigParameter paramId
Single* value
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetParameterInt32(Void*, ConfigParameter, Int32*)

Declaration
ErrorCode c_SparkMax_GetParameterInt32(void *handle, ConfigParameter paramId, int *value)
Parameters
Type Name Description
Void* handle
ConfigParameter paramId
Int32* value
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetParameterUint32(Void*, ConfigParameter, UInt32*)

Declaration
ErrorCode c_SparkMax_GetParameterUint32(void *handle, ConfigParameter paramId, uint *value)
Parameters
Type Name Description
Void* handle
ConfigParameter paramId
UInt32* value
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetPeriodicStatus0(Void*, PeriodicStatus0*)

Declaration
ErrorCode c_SparkMax_GetPeriodicStatus0(void *handle, PeriodicStatus0*rawframe)
Parameters
Type Name Description
Void* handle
PeriodicStatus0* rawframe
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetPeriodicStatus1(Void*, PeriodicStatus1*)

Declaration
ErrorCode c_SparkMax_GetPeriodicStatus1(void *handle, PeriodicStatus1*rawframe)
Parameters
Type Name Description
Void* handle
PeriodicStatus1* rawframe
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetPeriodicStatus2(Void*, PeriodicStatus2*)

Declaration
ErrorCode c_SparkMax_GetPeriodicStatus2(void *handle, PeriodicStatus2*rawframe)
Parameters
Type Name Description
Void* handle
PeriodicStatus2* rawframe
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetPeriodicStatus3(Void*, PeriodicStatus3*)

Declaration
ErrorCode c_SparkMax_GetPeriodicStatus3(void *handle, PeriodicStatus3*rawframe)
Parameters
Type Name Description
Void* handle
PeriodicStatus3* rawframe
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetPeriodicStatus4(Void*, PeriodicStatus4*)

Declaration
ErrorCode c_SparkMax_GetPeriodicStatus4(void *handle, PeriodicStatus4*rawframe)
Parameters
Type Name Description
Void* handle
PeriodicStatus4* rawframe
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetPositionConversionFactor(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetPositionConversionFactor(void *handle, float *conversion)
Parameters
Type Name Description
Void* handle
Single* conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetSecondaryCurrentLimit(Void*, Single*, Int32*)

Declaration
ErrorCode c_SparkMax_GetSecondaryCurrentLimit(void *handle, float *limit, int *chopCycles)
Parameters
Type Name Description
Void* handle
Single* limit
Int32* chopCycles
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetSmartCurrentLimit(Void*, Byte*, Byte*, UInt32*)

Declaration
ErrorCode c_SparkMax_GetSmartCurrentLimit(void *handle, byte *stallLimit, byte *freeLimit, uint *limitRPM)
Parameters
Type Name Description
Void* handle
Byte* stallLimit
Byte* freeLimit
UInt32* limitRPM
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetSmartMotionAccelStrategy(Void*, Int32, AccelStrategy*)

Declaration
ErrorCode c_SparkMax_GetSmartMotionAccelStrategy(void *handle, int slotID, AccelStrategy*accelStrategy)
Parameters
Type Name Description
Void* handle
Int32 slotID
AccelStrategy* accelStrategy
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetSmartMotionAllowedClosedLoopError(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetSmartMotionAllowedClosedLoopError(void *handle, int slotID, float *allowedError)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* allowedError
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetSmartMotionMaxAccel(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetSmartMotionMaxAccel(void *handle, int slotID, float *maxAccel)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* maxAccel
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetSmartMotionMaxVelocity(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetSmartMotionMaxVelocity(void *handle, int slotID, float *maxVel)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* maxVel
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetSmartMotionMinOutputVelocity(Void*, Int32, Single*)

Declaration
ErrorCode c_SparkMax_GetSmartMotionMinOutputVelocity(void *handle, int slotID, float *minVel)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single* minVel
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetSoftLimit(Void*, LimitDirection, Single*)

Declaration
ErrorCode c_SparkMax_GetSoftLimit(void *handle, LimitDirection dir, float *limit)
Parameters
Type Name Description
Void* handle
LimitDirection dir
Single* limit
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetStickyFault(Void*, FaultID, Byte*)

Declaration
ErrorCode c_SparkMax_GetStickyFault(void *handle, FaultID faultId, byte *stickyfault)
Parameters
Type Name Description
Void* handle
FaultID faultId
Byte* stickyfault
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetStickyFaults(Void*, UInt16*)

Declaration
ErrorCode c_SparkMax_GetStickyFaults(void *handle, ushort *stickyFaults)
Parameters
Type Name Description
Void* handle
UInt16* stickyFaults
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetVelocityConversionFactor(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetVelocityConversionFactor(void *handle, float *conversion)
Parameters
Type Name Description
Void* handle
Single* conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_GetVoltageCompensationNominalVoltage(Void*, Single*)

Declaration
ErrorCode c_SparkMax_GetVoltageCompensationNominalVoltage(void *handle, float *nominalVoltage)
Parameters
Type Name Description
Void* handle
Single* nominalVoltage
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_IDAssign(UInt32, Byte)

Declaration
ErrorCode c_SparkMax_IDAssign(uint uniqueId, byte deviceId)
Parameters
Type Name Description
UInt32 uniqueId
Byte deviceId
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_Identify(Void*)

Declaration
ErrorCode c_SparkMax_Identify(void *handle)
Parameters
Type Name Description
Void* handle
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_IdentifyUniqueId(UInt32)

Declaration
ErrorCode c_SparkMax_IdentifyUniqueId(uint uniqueId)
Parameters
Type Name Description
UInt32 uniqueId
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_IDQuery(UInt32*, IntPtr, IntPtr*)

Declaration
ErrorCode c_SparkMax_IDQuery(uint *uniqueIdArray, IntPtr uniqueIdArraySize, IntPtr*numberOfDevices)
Parameters
Type Name Description
UInt32* uniqueIdArray
IntPtr uniqueIdArraySize
IntPtr* numberOfDevices
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_IsFollower(Void*, Byte*)

Declaration
ErrorCode c_SparkMax_IsFollower(void *handle, byte *isFollower)
Parameters
Type Name Description
Void* handle
Byte* isFollower
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_IsLimitEnabled(Void*, LimitDirection, Byte*)

Declaration
ErrorCode c_SparkMax_IsLimitEnabled(void *handle, LimitDirection sw, byte *enabled)
Parameters
Type Name Description
Void* handle
LimitDirection sw
Byte* enabled
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_IsSoftLimitEnabled(Void*, LimitDirection, Byte*)

Declaration
ErrorCode c_SparkMax_IsSoftLimitEnabled(void *handle, LimitDirection dir, byte *enabled)
Parameters
Type Name Description
Void* handle
LimitDirection dir
Byte* enabled
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_RestoreFactoryDefaults(Void*, Byte)

Declaration
ErrorCode c_SparkMax_RestoreFactoryDefaults(void *handle, byte persist)
Parameters
Type Name Description
Void* handle
Byte persist
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SafeFloat(Single)

Declaration
float c_SparkMax_SafeFloat(float f)
Parameters
Type Name Description
Single f
Returns
Type Description
Single
| Improve this Doc View Source

c_SparkMax_SetAltEncoderAverageDepth(Void*, UInt32)

Declaration
ErrorCode c_SparkMax_SetAltEncoderAverageDepth(void *handle, uint depth)
Parameters
Type Name Description
Void* handle
UInt32 depth
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAltEncoderCountsPerRevolution(Void*, UInt32)

Declaration
ErrorCode c_SparkMax_SetAltEncoderCountsPerRevolution(void *handle, uint cpr)
Parameters
Type Name Description
Void* handle
UInt32 cpr
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAltEncoderInverted(Void*, Byte)

Declaration
ErrorCode c_SparkMax_SetAltEncoderInverted(void *handle, byte inverted)
Parameters
Type Name Description
Void* handle
Byte inverted
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAltEncoderMeasurementPeriod(Void*, UInt32)

Declaration
ErrorCode c_SparkMax_SetAltEncoderMeasurementPeriod(void *handle, uint samples)
Parameters
Type Name Description
Void* handle
UInt32 samples
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAltEncoderPosition(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetAltEncoderPosition(void *handle, float position)
Parameters
Type Name Description
Void* handle
Single position
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAltEncoderPositionFactor(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetAltEncoderPositionFactor(void *handle, float conversion)
Parameters
Type Name Description
Void* handle
Single conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAltEncoderVelocityFactor(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetAltEncoderVelocityFactor(void *handle, float conversion)
Parameters
Type Name Description
Void* handle
Single conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAnalogAverageDepth(Void*, UInt32)

Declaration
ErrorCode c_SparkMax_SetAnalogAverageDepth(void *handle, uint depth)
Parameters
Type Name Description
Void* handle
UInt32 depth
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAnalogInverted(Void*, Byte)

Declaration
ErrorCode c_SparkMax_SetAnalogInverted(void *handle, byte inverted)
Parameters
Type Name Description
Void* handle
Byte inverted
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAnalogMeasurementPeriod(Void*, UInt32)

Declaration
ErrorCode c_SparkMax_SetAnalogMeasurementPeriod(void *handle, uint samples)
Parameters
Type Name Description
Void* handle
UInt32 samples
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAnalogMode(Void*, AnalogMode)

Declaration
ErrorCode c_SparkMax_SetAnalogMode(void *handle, AnalogMode mode)
Parameters
Type Name Description
Void* handle
AnalogMode mode
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAnalogPositionConversionFactor(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetAnalogPositionConversionFactor(void *handle, float conversion)
Parameters
Type Name Description
Void* handle
Single conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAnalogVelocityConversionFactor(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetAnalogVelocityConversionFactor(void *handle, float conversion)
Parameters
Type Name Description
Void* handle
Single conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetAverageDepth(Void*, UInt32)

Declaration
ErrorCode c_SparkMax_SetAverageDepth(void *handle, uint depth)
Parameters
Type Name Description
Void* handle
UInt32 depth
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetCANTimeout(Void*, Int32)

Declaration
ErrorCode c_SparkMax_SetCANTimeout(void *handle, int timeoutMs)
Parameters
Type Name Description
Void* handle
Int32 timeoutMs
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetClosedLoopRampRate(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetClosedLoopRampRate(void *handle, float rate)
Parameters
Type Name Description
Void* handle
Single rate
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetControlFramePeriod(Void*, Int32)

Declaration
void c_SparkMax_SetControlFramePeriod(void *handle, int periodMs)
Parameters
Type Name Description
Void* handle
Int32 periodMs
| Improve this Doc View Source

c_SparkMax_SetCountsPerRevolution(Void*, UInt32)

Declaration
ErrorCode c_SparkMax_SetCountsPerRevolution(void *handle, uint cpr)
Parameters
Type Name Description
Void* handle
UInt32 cpr
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetD(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetD(void *handle, int slotID, float gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetDataPortConfig(Void*, DataPortConfig)

Declaration
ErrorCode c_SparkMax_SetDataPortConfig(void *handle, DataPortConfig config)
Parameters
Type Name Description
Void* handle
DataPortConfig config
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetDFilter(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetDFilter(void *handle, int slotID, float gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetEncoderInverted(Void*, Byte)

Declaration
ErrorCode c_SparkMax_SetEncoderInverted(void *handle, byte inverted)
Parameters
Type Name Description
Void* handle
Byte inverted
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetEncoderPosition(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetEncoderPosition(void *handle, float position)
Parameters
Type Name Description
Void* handle
Single position
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetFeedbackDevice(Void*, UInt32)

Declaration
ErrorCode c_SparkMax_SetFeedbackDevice(void *handle, uint sensorID)
Parameters
Type Name Description
Void* handle
UInt32 sensorID
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetFeedbackDeviceRange(Void*, Single, Single)

Declaration
ErrorCode c_SparkMax_SetFeedbackDeviceRange(void *handle, float min, float max)
Parameters
Type Name Description
Void* handle
Single min
Single max
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetFF(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetFF(void *handle, int slotID, float gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetFollow(Void*, UInt32, UInt32)

Declaration
ErrorCode c_SparkMax_SetFollow(void *handle, uint followerArbId, uint followerCfg)
Parameters
Type Name Description
Void* handle
UInt32 followerArbId
UInt32 followerCfg
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetI(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetI(void *handle, int slotID, float gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetIAccum(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetIAccum(void *handle, float iAccum)
Parameters
Type Name Description
Void* handle
Single iAccum
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetIdleMode(Void*, IdleMode)

Declaration
ErrorCode c_SparkMax_SetIdleMode(void *handle, IdleMode idlemode)
Parameters
Type Name Description
Void* handle
IdleMode idlemode
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetIMaxAccum(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetIMaxAccum(void *handle, int slotID, float iMaxAccum)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single iMaxAccum
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetInverted(Void*, Byte)

Declaration
ErrorCode c_SparkMax_SetInverted(void *handle, byte inverted)
Parameters
Type Name Description
Void* handle
Byte inverted
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetIZone(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetIZone(void *handle, int slotID, float IZone)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single IZone
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetLastError(Void*, ErrorCode)

Declaration
void c_SparkMax_SetLastError(void *handle, ErrorCode error)
Parameters
Type Name Description
Void* handle
ErrorCode error
| Improve this Doc View Source

c_SparkMax_SetLimitPolarity(Void*, LimitDirection, LimitPolarity)

Declaration
ErrorCode c_SparkMax_SetLimitPolarity(void *handle, LimitDirection sw, LimitPolarity polarity)
Parameters
Type Name Description
Void* handle
LimitDirection sw
LimitPolarity polarity
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetMeasurementPeriod(Void*, UInt32)

Declaration
ErrorCode c_SparkMax_SetMeasurementPeriod(void *handle, uint samples)
Parameters
Type Name Description
Void* handle
UInt32 samples
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetMotorType(Void*, MotorType)

Declaration
ErrorCode c_SparkMax_SetMotorType(void *handle, MotorType type)
Parameters
Type Name Description
Void* handle
MotorType type
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetOpenLoopRampRate(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetOpenLoopRampRate(void *handle, float rate)
Parameters
Type Name Description
Void* handle
Single rate
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetOutputRange(Void*, Int32, Single, Single)

Declaration
ErrorCode c_SparkMax_SetOutputRange(void *handle, int slotID, float min, float max)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single min
Single max
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetP(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetP(void *handle, int slotID, float gain)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single gain
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetParameterBool(Void*, ConfigParameter, Byte)

Declaration
ErrorCode c_SparkMax_SetParameterBool(void *handle, ConfigParameter paramId, byte value)
Parameters
Type Name Description
Void* handle
ConfigParameter paramId
Byte value
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetParameterFloat32(Void*, ConfigParameter, Single)

Declaration
ErrorCode c_SparkMax_SetParameterFloat32(void *handle, ConfigParameter paramId, float value)
Parameters
Type Name Description
Void* handle
ConfigParameter paramId
Single value
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetParameterInt32(Void*, ConfigParameter, Int32)

Declaration
ErrorCode c_SparkMax_SetParameterInt32(void *handle, ConfigParameter paramId, int value)
Parameters
Type Name Description
Void* handle
ConfigParameter paramId
Int32 value
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetParameterUint32(Void*, ConfigParameter, UInt32)

Declaration
ErrorCode c_SparkMax_SetParameterUint32(void *handle, ConfigParameter paramId, uint value)
Parameters
Type Name Description
Void* handle
ConfigParameter paramId
UInt32 value
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetPeriodicFramePeriod(Void*, PeriodicFrame, Int32)

Declaration
ErrorCode c_SparkMax_SetPeriodicFramePeriod(void *handle, PeriodicFrame frameId, int periodMs)
Parameters
Type Name Description
Void* handle
PeriodicFrame frameId
Int32 periodMs
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetpointCommand(Void*, Single, ControlType, Int32, Single, Int32)

Declaration
ErrorCode c_SparkMax_SetpointCommand(void *handle, float value, ControlType ctrl, int pidSlot, float arbFeedforward, int arbFFUnits)
Parameters
Type Name Description
Void* handle
Single value
ControlType ctrl
Int32 pidSlot
Single arbFeedforward
Int32 arbFFUnits
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetPositionConversionFactor(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetPositionConversionFactor(void *handle, float conversion)
Parameters
Type Name Description
Void* handle
Single conversion
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetSecondaryCurrentLimit(Void*, Single, Int32)

Declaration
ErrorCode c_SparkMax_SetSecondaryCurrentLimit(void *handle, float limit, int chopCycles)
Parameters
Type Name Description
Void* handle
Single limit
Int32 chopCycles
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetSensorType(Void*, EncoderType)

Declaration
ErrorCode c_SparkMax_SetSensorType(void *handle, EncoderType sensorType)
Parameters
Type Name Description
Void* handle
EncoderType sensorType
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetSmartCurrentLimit(Void*, Byte, Byte, UInt32)

Declaration
ErrorCode c_SparkMax_SetSmartCurrentLimit(void *handle, byte stallLimit, byte freeLimit, uint limitRPM)
Parameters
Type Name Description
Void* handle
Byte stallLimit
Byte freeLimit
UInt32 limitRPM
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetSmartMotionAccelStrategy(Void*, Int32, AccelStrategy)

Declaration
ErrorCode c_SparkMax_SetSmartMotionAccelStrategy(void *handle, int slotID, AccelStrategy accelStrategy)
Parameters
Type Name Description
Void* handle
Int32 slotID
AccelStrategy accelStrategy
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetSmartMotionAllowedClosedLoopError(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetSmartMotionAllowedClosedLoopError(void *handle, int slotID, float allowedError)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single allowedError
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetSmartMotionMaxAccel(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetSmartMotionMaxAccel(void *handle, int slotID, float maxAccel)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single maxAccel
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetSmartMotionMaxVelocity(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetSmartMotionMaxVelocity(void *handle, int slotID, float maxVel)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single maxVel
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetSmartMotionMinOutputVelocity(Void*, Int32, Single)

Declaration
ErrorCode c_SparkMax_SetSmartMotionMinOutputVelocity(void *handle, int slotID, float minVel)
Parameters
Type Name Description
Void* handle
Int32 slotID
Single minVel
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetSoftLimit(Void*, LimitDirection, Single)

Declaration
ErrorCode c_SparkMax_SetSoftLimit(void *handle, LimitDirection dir, float limit)
Parameters
Type Name Description
Void* handle
LimitDirection dir
Single limit
Returns
Type Description
ErrorCode
| Improve this Doc View Source

c_SparkMax_SetVelocityConversionFactor(Void*, Single)

Declaration
ErrorCode c_SparkMax_SetVelocityConversionFactor(void *handle, float conversion)
Parameters
Type Name Description
Void* handle
Single conversion
Returns
Type Description
ErrorCode
  • Improve this Doc
  • View Source
Back to top Copyright © 2017 RobotDotNet